[dh-make-perl-cvs-dev] CVS dh-make-perl
CVS User gwolf
cvs at dh-make-perl.alioth.debian.org
Tue Aug 29 01:59:19 UTC 2006
Update of /cvsroot/dh-make-perl/dh-make-perl
In directory haydn:/tmp/cvs-serv30691
Modified Files:
dh-make-perl
Log Message:
New version 0.23
--- /cvsroot/dh-make-perl/dh-make-perl/dh-make-perl 2006/08/14 01:26:25 1.41
+++ /cvsroot/dh-make-perl/dh-make-perl/dh-make-perl 2006/08/29 01:59:19 1.42
@@ -143,7 +143,7 @@
#my $section = 'interpreters';
my $section = 'perl';
my $depends = '${perl:Depends}';
-my $bdependsi = 'perl (>= 5.8.0-7)';
+my $bdependsi = 'perl (>= ' . `dpkg -p perl|grep ^Version:|cut -f 2 -d \ ` . ')';
my $bdepends = 'debhelper (>= 5.0.0)';
my $maintainer = get_maintainer();
my $arch = 'all';
@@ -166,7 +166,7 @@
my ($extrasfields, $extrapfields);
my (@docs, $changelog, @args);
my ($cpanmodule, $cpanplusmodule, $cpanmirror, $build, $install, $dbflags,
- $excludeRE, $notest, $nometa);
+ $excludeRE, $notest, $nometa, $requiredeps);
my $mod_cpan_version;
@@ -188,12 +188,13 @@
"install!" => \$install,
"notest" => \$notest,
"nometa" => \$nometa,
+ "requiredeps" => \$requiredeps,
) || die <<"USAGE";
Usage:
$0 [ --build ] [ --install ] [ SOURCE_DIR | --cpan MODULE ]
Other options: [ --desc DESCRIPTION ] [ --arch all|any ] [ --version VERSION ]
[ --cpan-mirror MIRROR ] [ --exclude|-i [REGEX] ] [ --notest ]
- [ --nometa]
+ [ --nometa ] [ --requiredeps ]
USAGE
$excludeRE = '(?:\/|^)(?:CVS|.svn)\/' if ($excludeRE && $excludeRE == 1);
@@ -619,12 +620,21 @@
push @not_debs, $module;
}
}
+ } elsif ( $requiredeps ) {
+ die "--requiredeps was specified, but apt-file was not found\n";
}
print "\n";
print "Needs the following debian packages: " . join (", ", @deps) . "\n" if (@deps);
- print "Needs the following modules for which there are no debian packages available: "
- . join (", ", @not_debs) . "\n" if (@not_debs);
+ if (@not_debs) {
+ my $missing_debs_str = "Needs the following modules for which there are no debian packages available: "
+ . join (", ", @not_debs) . "\n";
+ if ( $requiredeps ) {
+ die $missing_debs_str;
+ } else {
+ print $missing_debs_str;
+ }
+ }
return join (", ", @deps);
}
@@ -657,12 +667,18 @@
sub create_control {
my ($file) = shift;
+
+ if ($arch ne 'all') {
+ $bdepends .= ", $bdependsi";
+ $bdependsi = '';
+ }
+
open(C, ">$file") || die "Cannot open $file: $!\n";
print C "Source: $srcname\n";
print C "Section: $section\n";
print C "Priority: $priority\n";
print C "Build-Depends: $bdepends\n";
- print C "Build-Depends-Indep: $bdependsi\n";
+ print C "Build-Depends-Indep: $bdependsi\n" if $bdependsi;
print C $extrasfields if defined $extrasfields;
print C "Maintainer: $maintainer\n";
print C "Standards-Version: $debstdversion\n";
@@ -902,6 +918,11 @@
Does not run the automatic testing of the module as part of the build script.
This is mostly useful when packaging buggy or incomplete software.
+=item B<--requiredeps>
+
+Fail if a dependency perl package was not found (dependency tracking
+requires the apt-file package installed and updated)
+
=back
=head1 DESCRIPTION
More information about the Dh-make-perl-cvs-dev
mailing list