diff options
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | dh_installman | 4 | ||||
-rwxr-xr-x | dh_perl | 63 |
4 files changed, 48 insertions, 30 deletions
diff --git a/debian/changelog b/debian/changelog index 1337d61e..efc73e22 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (3.0.18) unstable; urgency=low + + * dh_perl: updates from bod: + - Provide minimum version for arch-indep module dependencies + (perl-policy 1,18, section 3.4.1). + - Always update substvars, even if Perl:Depends is empty. + + -- Joey Hess <joeyh@debian.org> Sat, 21 Apr 2001 15:13:15 -0700 + debhelper (3.0.17) unstable; urgency=low * dh_shlibdeps: document that -l accepts multiple dirs, and diff --git a/debian/control b/debian/control index 084fbb81..9dca1704 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Joey Hess <joeyh@debian.org> Build-Depends-Indep: perl-5.6, fileutils (>= 4.0-2.1), file (>= 3.23-1), debconf-utils -Standards-Version: 3.5.2.0 +Standards-Version: 3.5.3.0 Package: debhelper Architecture: all diff --git a/dh_installman b/dh_installman index e48ff6aa..d8585aa2 100755 --- a/dh_installman +++ b/dh_installman @@ -16,9 +16,9 @@ use Debian::Debhelper::Dh_Lib; =head1 DESCRIPTION -dh_installman is a debhelper program that is responsible for installing +dh_installman is a debhelper program that handles for installing man pages into the correct locations in package build directories. You tell -it what man pages go in your package(s), and it figures out where to +it what man pages go in your packages, and it figures out where to install them based on the section field in their .TH line and their filename extention. @@ -55,7 +55,7 @@ directories by default. Debian policy, version 3.0.1 -Perl policy, version 1.15 +Perl policy, version 1.18 =cut @@ -64,6 +64,10 @@ init(); my $vendorlib = substr $Config{vendorlib}, 1; my $vendorarch = substr $Config{vendorarch}, 1; +# the installation dir for arch-indep modules changed to +# /usr/share/perl5 in this version: +my $min_version = '5.6.0-16'; + # Cleaning the paths given on the command line foreach (@ARGV) { s#/$##; @@ -84,6 +88,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp = tmpdir($package); my $ext = pkgext($package); + my @subs; + if (open IN, "debian/${ext}substvars") + { + @subs = grep !/^perl:Depends=/, <IN>; + close IN; + } + # Check also for alternate locations given on the command line my @dirs = grep -d, map "$tmp/$_", $vendorlib, $vendorarch, @ARGV; @@ -108,35 +119,33 @@ foreach my $package (@{$dh{DOPACKAGES}}) { close F; }, $tmp; - next unless $deps; - - my $perl_depends = $perl; - if ($deps & XS_MODULE or $dh{V_FLAG_SET}) + if ($deps) { - ($version) = `dpkg -s $perl` =~ /^Version:\s*(\S+)/m - unless $version; - - $perl_depends .= " (>= $version)"; + my $perl_depends = $perl; + if ($deps & XS_MODULE or $dh{V_FLAG_SET}) + { + ($version) = `dpkg -s $perl` =~ /^Version:\s*(\S+)/m + unless $version; + + $perl_depends .= " (>= $version)"; + } + elsif ($deps & PM_MODULE) + { + $perl_depends .= " (>= $min_version)"; + } + + # add perlapi-<ver> for XS modules + $perl_depends .= ", perlapi-$Config{version}" + if $deps & XS_MODULE; + + # don't need to depend on an un-versioned perl-base, it's + # essential + push @subs, "perl:Depends=$perl_depends\n" + unless $perl_depends eq 'perl-base'; } - # add perlapi-<ver> for XS modules - $perl_depends .= ", perlapi-$Config{version}" - if $deps & XS_MODULE; - - # don't need to depend on an un-versioned perl-base, it's - # essential - next if $perl_depends eq 'perl-base'; - - if (-e "debian/${ext}substvars") { - open (IN, "<debian/${ext}substvars"); - my @lines=grep { ! /^perl:Depends=/ } <IN>; - close IN; - open (OUT, ">debian/${ext}substvars"); - print OUT @lines; - } else { - open (OUT, ">debian/${ext}substvars"); - } - print OUT "perl:Depends=$perl_depends\n"; + open OUT, ">debian/${ext}substvars"; + print OUT @subs; close OUT; } |