From a0061c2bdf1020c3475604422755eabd3a46da76 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:17:43 +0000 Subject: r236: Initial Import --- dh_installinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dh_installinfo') diff --git a/dh_installinfo b/dh_installinfo index b6ae40f9..20d5e003 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -49,7 +49,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { if ($section ne '') { autoscript($PACKAGE,"postinst","postinst-info", - "s/#SECTION#/$section/;s:#FILE#:$fn:"); + "s/#SECTION#/$section/g;s:#FILE#:$fn:"); } else { autoscript($PACKAGE,"postinst","postinst-info-nosection", -- cgit v1.2.3 From 6a4c47eea5a5601f351a1fa0afd5e13aed56238b Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:18:11 +0000 Subject: r238: Initial Import --- Dh_Lib.pm | 6 +++--- debian/changelog | 6 ++++++ dh_builddeb | 2 +- dh_clean | 2 +- dh_compress | 2 +- dh_debstd | 2 +- dh_du | 2 +- dh_fixperms | 2 +- dh_gencontrol | 2 +- dh_installchangelogs | 2 +- dh_installcron | 2 +- dh_installdeb | 2 +- dh_installdebfiles | 4 ++-- dh_installdirs | 2 +- dh_installdocs | 2 +- dh_installemacsen | 2 +- dh_installexamples | 2 +- dh_installinfo | 2 +- dh_installinit | 2 +- dh_installmanpages | 2 +- dh_installmenu | 2 +- dh_installmime | 2 +- dh_installmodules | 2 +- dh_installpam | 2 +- dh_installwm | 2 +- dh_installxaw | 6 +++--- dh_link | 2 +- dh_listpackages | 2 +- dh_makeshlibs | 2 +- dh_md5sums | 2 +- dh_movefiles | 2 +- dh_perl | 2 +- dh_shlibdeps | 2 +- dh_strip | 2 +- dh_suidregister | 2 +- dh_testdir | 2 +- dh_testroot | 2 +- dh_testversion | 2 +- dh_undocumented | 2 +- doc/PROGRAMMING | 2 +- 40 files changed, 50 insertions(+), 44 deletions(-) (limited to 'dh_installinfo') diff --git a/Dh_Lib.pm b/Dh_Lib.pm index 73fd44ad..c5146b91 100644 --- a/Dh_Lib.pm +++ b/Dh_Lib.pm @@ -296,11 +296,11 @@ sub autoscript { my $package=shift; my $script=shift; my $filename=shift; my $se $infile="$ENV{DH_AUTOSCRIPTDIR}/$filename"; } else { - if (-e "/usr/lib/debhelper/autoscripts/$filename") { - $infile="/usr/lib/debhelper/autoscripts/$filename"; + if (-e "/usr/share/debhelper/autoscripts/$filename") { + $infile="/usr/share/debhelper/autoscripts/$filename"; } else { - error("/usr/lib/debhelper/autoscripts/$filename does not exist"); + error("/usr/share/debhelper/autoscripts/$filename does not exist"); } } diff --git a/debian/changelog b/debian/changelog index ec5c5058..d8ced366 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (2.0.13) unstable; urgency=low + + * dh_fixperms: FHS fixes (#41058) + + -- Joey Hess Fri, 9 Jul 1999 13:07:49 -0700 + debhelper (2.0.12) unstable; urgency=low * dh_installinfo: fixed #SECTION# substitution. diff --git a/dh_builddeb b/dh_builddeb index 9d760b5e..04c3570a 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -2,7 +2,7 @@ # # Build the .deb package, assuming all the files are set up. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_clean b/dh_clean index a328d12e..e87688de 100755 --- a/dh_clean +++ b/dh_clean @@ -3,7 +3,7 @@ # Clean up $TMP and other tepmorary files generated by the # build process. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_compress b/dh_compress index 73b12ba6..040291fb 100755 --- a/dh_compress +++ b/dh_compress @@ -4,7 +4,7 @@ # compressed files get fixed. use Cwd; -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_debstd b/dh_debstd index 1c2f1f05..89cfc182 100755 --- a/dh_debstd +++ b/dh_debstd @@ -38,7 +38,7 @@ foreach (@ARGV) { } @ARGV=@argv; -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_du b/dh_du index f81b074d..d0358999 100755 --- a/dh_du +++ b/dh_du @@ -5,7 +5,7 @@ # # No longer - it was decided these files are a bad idea. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; warning("this program does nothing and is deprecated. Remove it from debian/rules."); diff --git a/dh_fixperms b/dh_fixperms index f74a269c..ba4e74d6 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -2,7 +2,7 @@ # # Do some general file permission fixups. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_gencontrol b/dh_gencontrol index cadfdc03..a2d152c4 100755 --- a/dh_gencontrol +++ b/dh_gencontrol @@ -2,7 +2,7 @@ # # Generate and install the control file. Simple dpkg-gencontrol wrapper. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installchangelogs b/dh_installchangelogs index 4be52020..3ebb04ec 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -7,7 +7,7 @@ # if so, the debian changelog is just installed as "changelog", and it is an # error to specify an upstream changelog on the command line. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installcron b/dh_installcron index 72872668..5b872aca 100755 --- a/dh_installcron +++ b/dh_installcron @@ -2,7 +2,7 @@ # # Install cron scripts into the appropriate places. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installdeb b/dh_installdeb index f5f3055a..d3eebe76 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -2,7 +2,7 @@ # # Install files from debian/ into the package's DEBIAN directory. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installdebfiles b/dh_installdebfiles index cd4562ea..72c17bcc 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -3,10 +3,10 @@ # This program is deprecated, but left in the package for backwards # compatability. It simply calls the 3 programs that replaced it. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; -$ENV{PATH}="debian:$ENV{PATH}:/usr/lib/debhelper"; +$ENV{PATH}="debian:$ENV{PATH}:/usr/share/debhelper"; warning("use of this program is deprecated, see man page."); diff --git a/dh_installdirs b/dh_installdirs index 2d12b76b..7d5e49c1 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -2,7 +2,7 @@ # # Reads debian/dirs, creates the directories listed there -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installdocs b/dh_installdocs index 54e5b8e7..b82b21c2 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -4,7 +4,7 @@ # Also installs the debian/copyright and debian/README.debian and debian/TODO # and handles debian/doc-base. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installemacsen b/dh_installemacsen index 462e3f38..3fbaf8ba 100755 --- a/dh_installemacsen +++ b/dh_installemacsen @@ -2,7 +2,7 @@ # # Registration with emacsen-common. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installexamples b/dh_installexamples index 88e964ba..e8e5e3d6 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -3,7 +3,7 @@ # Reads debian/examples, installs all files listed there into # /usr/doc/$PACKAGE/examples -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installinfo b/dh_installinfo index 20d5e003..8ef2bab3 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -3,7 +3,7 @@ # Reads debian/info, installs all files listed there into /usr/info # and puts appropriate commands into the postinst. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installinit b/dh_installinit index 6432c513..c43d24d9 100755 --- a/dh_installinit +++ b/dh_installinit @@ -3,7 +3,7 @@ # Install debian/init[.d], and set up the postinst and postrm for init # scripts. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installmanpages b/dh_installmanpages index f4dca9a3..6d615a16 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -7,7 +7,7 @@ # This is a little bit (hah!) DWIMish, but still very handy. use File::Find; -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installmenu b/dh_installmenu index 2db16603..c077f215 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -8,7 +8,7 @@ # # Also, add to postinst and postrm. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installmime b/dh_installmime index 232ddc19..7cada574 100755 --- a/dh_installmime +++ b/dh_installmime @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installmodules b/dh_installmodules index 1e111e5a..0ee00dce 100755 --- a/dh_installmodules +++ b/dh_installmodules @@ -2,7 +2,7 @@ # # Register modules with modutils. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installpam b/dh_installpam index 2262d810..897fd7d8 100755 --- a/dh_installpam +++ b/dh_installpam @@ -4,7 +4,7 @@ # # If debian/pam file exists, save it to $TMP/etc/pam.d/$PACKAGE -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installwm b/dh_installwm index 0cae9147..21ee6300 100755 --- a/dh_installwm +++ b/dh_installwm @@ -2,7 +2,7 @@ # # Add to postinst and postrm to register a window manager. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_installxaw b/dh_installxaw index 849fbf00..f9980a6e 100755 --- a/dh_installxaw +++ b/dh_installxaw @@ -7,7 +7,7 @@ # # Also, add calls to postinst and postrm. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); @@ -51,8 +51,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { close IN; if ($stanza) { - $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'"; - $remove_opts.="'$data{'link-name'} $data{wrapped}'"; + $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' "; + $remove_opts.="'$data{'link-name'} $data{wrapped}' "; } autoscript($PACKAGE,"postinst","postinst-xaw", diff --git a/dh_link b/dh_link index 919dc524..1f6299aa 100755 --- a/dh_link +++ b/dh_link @@ -3,7 +3,7 @@ # Generate symlinks in debian packages, reading debian/links. The # file contains pairs of files and symlinks. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_listpackages b/dh_listpackages index 7a764af5..3ce48e06 100755 --- a/dh_listpackages +++ b/dh_listpackages @@ -2,7 +2,7 @@ # # Output a list of all packages debhelper will act on. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); print join("\n",@{$dh{DOPACKAGES}})."\n"; diff --git a/dh_makeshlibs b/dh_makeshlibs index dbf6bfc9..41bf1614 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -2,7 +2,7 @@ # # Automatically generate shlibs files. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_md5sums b/dh_md5sums index 8015df79..80b5f479 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -4,7 +4,7 @@ # package. use Cwd; -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_movefiles b/dh_movefiles index 09159d3b..7978163e 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -2,7 +2,7 @@ # # Move files out of debian/tmp, into subpackages. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_perl b/dh_perl index 0614b9b8..735711c3 100755 --- a/dh_perl +++ b/dh_perl @@ -3,7 +3,7 @@ # Find dependencies on perl stuff # Remove .packlist files -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_shlibdeps b/dh_shlibdeps index f7ac6012..69047dc0 100755 --- a/dh_shlibdeps +++ b/dh_shlibdeps @@ -2,7 +2,7 @@ # # Find dependancies. Simple dpkg-shlibdeps wrapper. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_strip b/dh_strip index ad5d40a8..9d6ab050 100755 --- a/dh_strip +++ b/dh_strip @@ -3,7 +3,7 @@ # Strip files. use File::Find; -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_suidregister b/dh_suidregister index 15b1fe4d..dd01c2ce 100755 --- a/dh_suidregister +++ b/dh_suidregister @@ -6,7 +6,7 @@ # If there are parameters, or there is a debian/suid, register the files # listed there. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_testdir b/dh_testdir index 0cb95c1d..6d9258db 100755 --- a/dh_testdir +++ b/dh_testdir @@ -4,7 +4,7 @@ # Tests for the existance of debian/control, and for the existance # of any other files you specify on the command line. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_testroot b/dh_testroot index 629b8f84..6ce2a134 100755 --- a/dh_testroot +++ b/dh_testroot @@ -2,7 +2,7 @@ # # Checks to make sure you are root. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/dh_testversion b/dh_testversion index 57c0e588..096aa9e1 100755 --- a/dh_testversion +++ b/dh_testversion @@ -2,7 +2,7 @@ # # Debhelper version check. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; use Dh_Version; # contains the version number of debhelper. init(); diff --git a/dh_undocumented b/dh_undocumented index c4264d6b..77ee3f58 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -6,7 +6,7 @@ # Also, it looks for debian/undocumented files for more lists of # undocumented man pages. -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 02b11a21..891d31b0 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -51,7 +51,7 @@ supported now, though.) Use Dh_lib.pm like this: -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); -- cgit v1.2.3 From 1a5315595b2f06feab10168825442f651cb11947 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:18:44 +0000 Subject: r242: Initial Import --- debian/changelog | 6 ++++++ dh_installinfo | 4 ++-- dh_installxaw | 8 ++++---- dh_perl | 23 ++++++++++++++++++----- dh_perl.1 | 10 +++++++++- 5 files changed, 39 insertions(+), 12 deletions(-) (limited to 'dh_installinfo') diff --git a/debian/changelog b/debian/changelog index b26eb15f..784b3ca3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (2.0.17) unstable; urgency=low + + * dh_clean: compat() wasn't exported. + + -- Joey Hess Wed, 21 Jul 1999 12:49:52 -0700 + debhelper (2.0.16) unstable; urgency=low * Dh_lib.pm: when looking for debhelper files in debian/, test with -f, diff --git a/dh_installinfo b/dh_installinfo index 8ef2bab3..2983d28f 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -35,7 +35,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { # a tree of info files. if ($file=~/\.info$/ && ! $dh{NOSCRIPTS}) { # Figure out what section this file goes in. - my $section; + my $section=''; open (IN, "<$file") || die "$file: $!"; while () { if (/INFO-DIR-SECTION\s+(.*)/) { @@ -53,7 +53,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } else { autoscript($PACKAGE,"postinst","postinst-info-nosection", - "s/#FILE#/$fn/"); + "s:#FILE#:$fn:"); } autoscript($PACKAGE,"prerm","prerm-info", "s:#FILE#:$fn:"); } diff --git a/dh_installxaw b/dh_installxaw index f9980a6e..d71be544 100755 --- a/dh_installxaw +++ b/dh_installxaw @@ -41,8 +41,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $stanza=1; } elsif ($stanza) { - $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'"; - $remove_opts.="'$data{'link-name'} $data{wrapped}'"; + $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' "; + $remove_opts.="'$data{'link-name'} $data{wrapped}' "; undef %data; $stanza=''; } @@ -51,8 +51,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { close IN; if ($stanza) { - $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' "; - $remove_opts.="'$data{'link-name'} $data{wrapped}' "; + $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'"; + $remove_opts.="'$data{'link-name'} $data{wrapped}'"; } autoscript($PACKAGE,"postinst","postinst-xaw", diff --git a/dh_perl b/dh_perl index 735711c3..fa9c8eb0 100755 --- a/dh_perl +++ b/dh_perl @@ -7,8 +7,8 @@ BEGIN { push @INC, "debian", "/usr/share/debhelper" } use Dh_Lib; init(); -my $perl = $ENV{PERL} || '/usr/bin/perl'; my $ext = ''; +my $lib_dir = 'usr/lib/perl5'; # Figure out the version of perl. If $ENV{PERL} is set, query the perl binary # it points to, otherwise query perl directly. @@ -17,6 +17,12 @@ if (defined $ENV{PERL}) { $version=`$ENV{PERL} -e 'printf "%.3f", \$]'`; } +# Cleaning the paths given on the command line +foreach (@ARGV) { + s#/$##; + s#^/##; +} + # If -d is given, then we'll try to depend on one of the perl-5.00X-base # package instead of perl-5.00X $ext='-base' if ($dh{'D_FLAG'}); @@ -30,17 +36,24 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { my $dep = ''; my $found = 0; + # Check also for alternate locations given on the command line + my $dirs = ''; + foreach ($lib_dir, @ARGV) { + $dirs .= "$TMP/$_ " if (-d "$TMP/$_"); + } + my $re = '(?:' . join('|', ($lib_dir, @ARGV)) . ')'; + # Look for perl modules and check where they are installed - if (-d "$TMP/usr/lib/perl5") { - foreach $file (split(/\n/,`find $TMP/usr/lib/perl5 -type f \\( -name "*.pm" -or -name "*.so" \\)`)) { + if ($dirs) { + foreach $file (split(/\n/,`find $dirs -type f \\( -name "*.pm" -or -name "*.so" \\)`)) { $found++; - if ($file =~ m<^$TMP/usr/lib/perl5/(\d\.\d{3})/([^/]+)/>) { + if ($file =~ m<^$TMP/$re/(\d\.\d{3})/([^/]+)/>) { $v = $1; $arch = $2; check_module_version ($v, $version); $v .= '-thread' if ($arch =~ /-thread/); $dep_arch = add_deps ($dep_arch, "perl-$v"); - } elsif ($file =~ m<^$TMP/usr/lib/perl5/(\d.\d{3})/>) { + } elsif ($file =~ m<^$TMP/$re/(\d.\d{3})/>) { $v = $1; check_module_version ($v, $version); $dep_arch = add_deps ($dep_arch, "perl-$v"); diff --git a/dh_perl.1 b/dh_perl.1 index 2d23bcb7..cc2bb503 100644 --- a/dh_perl.1 +++ b/dh_perl.1 @@ -3,7 +3,7 @@ dh_perl \- calculates perl scripts & modules dependencies .SH SYNOPSIS .B dh_perl -.I "[debhelper options] [-k] [-d]" +.I "[debhelper options] [-k] [-d] [library dirs ...]" .SH "DESCRIPTION" dh_perl is a debhelper program that is responsible for generating the perl:Depends substitutions and adding them to substvars files. @@ -36,6 +36,14 @@ the -d option to make .BR dh_perl generate a dependency on the correct base package. This is only necessary for some modules that are included in the base system. +.TP +.B library dirs +If your package does install perl modules in non-standard +directories, you can make +.BR dh_perl +check those directories by passing their names on the command line. +.BR dh_perl +will only check usr/lib/perl5 by default. .SH ENVIRONMENT See .BR debhelper (1) -- cgit v1.2.3