]> git.donarmstrong.com Git - debhelper.git/commitdiff
r242: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:18:44 +0000 (05:18 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:18:44 +0000 (05:18 +0000)
debian/changelog
dh_installinfo
dh_installxaw
dh_perl
dh_perl.1

index b26eb15fc308c8a134b13817316bac9247574ff9..784b3ca3bb409361a8785ab09a0e743e74ff4794 100644 (file)
@@ -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,
index 8ef2bab3bc8d3490ad9aef778f30d26c13b43310..2983d28f993c90397c6f6005cb0e33638ecfc505 100755 (executable)
@@ -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:");
                }
index f9980a6e435317a3f05753691ae45ffe9ed2a550..d71be544102b47069d553ab9f9924ad9531a8759 100755 (executable)
@@ -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 735711c37fa2be782976c594d57f7dd4e4f917fc..fa9c8eb097ab4ff603d79277d0482d89c558f74f 100755 (executable)
--- 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");
index 2d23bcb76b4c6ccdfb8818d2d1b225c59a1ac4b8..cc2bb50329802d485c32f5125afd70d240b1b179 100644 (file)
--- 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)