diff options
author | joey <joey> | 1999-08-17 05:18:44 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 05:18:44 +0000 |
commit | 1a5315595b2f06feab10168825442f651cb11947 (patch) | |
tree | f14cbaee2c04e1affc322ca0f3e6ff489aa2c96e | |
parent | b7e14a5eff72fffb13f5d58a81d7974671079671 (diff) | |
download | debhelper-1a5315595b2f06feab10168825442f651cb11947.tar.gz |
r242: Initial Import
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | dh_installinfo | 4 | ||||
-rwxr-xr-x | dh_installxaw | 8 | ||||
-rwxr-xr-x | dh_perl | 23 | ||||
-rw-r--r-- | dh_perl.1 | 10 |
5 files changed, 39 insertions, 12 deletions
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 <joeyh@master.debian.org> 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 (<IN>) { 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", @@ -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"); @@ -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) |