]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1029: This commit was manufactured by cvs2svn to create tag version_2.0.75
authorunknown <unknown>
Mon, 28 Jul 2003 18:47:05 +0000 (18:47 +0000)
committerunknown <unknown>
Mon, 28 Jul 2003 18:47:05 +0000 (18:47 +0000)
'debian_version_2_0_75'.

15 files changed:
1  2 
dh_gencontrol
dh_installcron
dh_installdirs
dh_installemacsen
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installpam
dh_link
dh_listpackages
dh_md5sums
dh_strip
dh_testdir
dh_testversion

diff --cc dh_gencontrol
index 4e9ff3e892203357b29e6e02448c8fea738480be,a2d152c432e367613daf7931efeaf19d7c0ae5b2..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,80 -1,30 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_gencontrol - generate and install control file
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_gencontrol> [S<I<debhelper options>>] [S<B<--> I<params>>]
- =head1 DESCRIPTION
- dh_gencontrol is a debhelper program that is responsible for generating
- control files, and installing them into the DEBIAN directory with the
- proper permissions.
- This program is merely a wrapper around L<dpkg-gencontrol(1)>, which calls
- it once for each package being acted on, and passes in some additional
- useful flags including "-isp". 
- =head1 OPTIONS
- =over 4
- =item B<-u>I<params>, B<--dpkg-gencontrol-params>I<params>
- =item B<--> I<params>
- Pass "params" to L<dpkg-gencontrol(1)>.
- =back
- =cut
 -#
 -# Generate and install the control file. Simple dpkg-gencontrol wrapper.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $ext=pkgext($package);
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $EXT=pkgext($PACKAGE);
--      
-       my $changelog=pkgfile($package,'changelog');
 -      $changelog=pkgfile($PACKAGE,'changelog');
--      if (! $changelog) {
--              $changelog='debian/changelog';
--      }
--
-       if ( ! -d "$tmp/DEBIAN" ) {
-               doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
 -      if ( ! -d '$TMP/DEBIAN' ) {
 -              doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
--      }
--
--      # Generate and install control file.
-       my @command="dpkg-gencontrol";
-       if (GetPackages() > 1) {
-               push @command, "-p$package";
-       }
-       doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars", 
-               "-P$tmp",@{$dh{U_PARAMS}});
 -      doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
 -              "-Tdebian/$EXT\substvars","-P$TMP",@{$dh{U_PARAMS}});
--
-       # This chmod is only necessary if the user sets the umask to
-       # something odd.
-       doit("chmod","644","$tmp/DEBIAN/control");
 -      # This chmod is only necessary if the user sets the umask to something odd.
 -      doit("chmod","644","$TMP/DEBIAN/control");
--      
-       doit("chown","0.0","$tmp/DEBIAN/control");
 -      doit("chown","root.root","$TMP/DEBIAN/control");
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installcron
index d28277c57e52565e47f87aab97d2af2500b3aaa2,5b872aca96f6bac3f95ffb3fbf55e0565aa1a937..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,58 -1,28 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installcron - install cron scripts into etc/cron.*
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installcron> [S<B<debhelper options>>]
- =head1 DESCRIPTION
- dh_installcron is a debhelper program that is responsible for installing
- cron scripts into etc/cron.*/ in package build directories. The files
- debian/package.cron.daily, debian/package.cron.weekly,
- debian/package.cron.monthly, and debian/package.cron.d are installed.
- =cut
 -#
 -# Install cron scripts into the appropriate places.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       foreach my $type (qw{daily weekly monthly}) {
-               my $cron=pkgfile($package,"cron.$type");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      foreach $type (qw{daily weekly monthly}) {
 -              $cron=pkgfile($PACKAGE,"cron.$type");
--              if ($cron) {
-                       if (! -d "$tmp/etc/cron.$type") {
-                               doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.$type");
 -                      if (! -d "$TMP/etc/cron.$type") {
 -                              doit("install","-o","root","-g","root","-d","$TMP/etc/cron.$type");
--                      }
-                       doit("install",$cron,"$tmp/etc/cron.$type/$package");
 -                      doit("install",$cron,"$TMP/etc/cron.$type/$PACKAGE");
--              }
--      }
--      # Seperate because this needs to be mode 644.
-       my $cron=pkgfile($package,"cron.d");
 -      $cron=pkgfile($PACKAGE,"cron.d");
--      if ($cron) {
-               if (! -d "$tmp/etc/cron.d") {
-                       doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.d");
 -              if (! -d "$TMP/etc/cron.d") {
 -                      doit("install","-o","root","-g","root","-d","$TMP/etc/cron.d");
--              }       
-               doit("install","-m",644,$cron,"$tmp/etc/cron.d/$package");
 -              doit("install","-m",644,$cron,"$TMP/etc/cron.d/$PACKAGE");
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installdirs
index 3bd4ea8061da50d885c8f90e2b85e9e23ce10d12,7d5e49c1663185cc594224c7018a1a0206b78eec..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,97 -1,42 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installdirs - create subdirectories in package build directories
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installdirs> [S<I<debhelper options>>] [B<-A>] [S<I<dir ...>>]
- =head1 DESCRIPTION
- dh_installdirs is a debhelper program that is responsible for creating
- subdirectories in package build directories.
- Any directory names specified as parameters will be created in the package
- build directory of the first package dh_installdirs is told to act on. By
- default, this is the first binary package in debian/control, but if you use
- -p, -i, or -a flags, it will be the first package specified by those flags.
- A file named debian/package.dirs can list other directories to be created.
- Separate the directory names with whitespace.
- Be sure to only use directory names relative to the package build
- directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead.
- =head1 OPTIONS
- =over 4
- =item B<-A>, B<--all>
- Create any directories specified by command line parameters in ALL packages
- acted on, not just the first.
- =item I<dir ...>
- Create these directories in the package build directory of the first
- package acted on. (Or in all packages if -A is specified.)
- =back
- =cut
 -#
 -# Reads debian/dirs, creates the directories listed there
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $file=pkgfile($package,"dirs");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $file=pkgfile($PACKAGE,"dirs");
--
-       if (! -e $tmp) {
-               doit("install","-d",$tmp);
 -      if (! -e $TMP) {
 -              doit("install","-d",$TMP);
--      }
--
-       my @dirs;
 -      undef @dirs;
--
--      if ($file) {
--              @dirs=filearray($file)
--      }
--
-       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
 -      if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
--              push @dirs, @ARGV;
--      }       
--
--      if (@dirs) {
-               # Stick the $tmp onto the front of all the dirs.
 -              # Stick the $TMP onto the front of all the dirs.
--              # This is necessary, for 2 reasons, one to make them 
--              # be in the right directory, but more importantly, it 
--              # protects against the danger of absolute dirs being
--              # specified.
--              @dirs=map {
-                               $_="$tmp/$_";
 -                              $_="$TMP/$_";
--                              tr:/:/:s; # just beautification.
--                              $_
--                        } @dirs;
--
--              # Create dirs.
--              doit("install","-d",@dirs);
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installemacsen
index 80b83e693a206a60a6a76cf61ac6a4b1f16c8730,3fbaf8ba100e5278f85fb5cc3ec76b1db1889526..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,118 -1,52 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installemacsen - register an emacs add on package
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installemacsen> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [B<--flavor=>I<foo>]
- =head1 DESCRIPTION
- dh_installemacsen is a debhelper program that is responsible for installing
- files used by the debian emacsen-common package into package build
- directories.
- It also automatically generates the postinst and prerm commands needed to
- register a package as an emacs add on package. See L<dh_installdeb(1)>
- for an explanation of how this works.
- If a file named debian/package.emacsen-install exists, then it is installed
- into
- usr/lib/emacsen-common/packages/install/package in the package build
- directory. Similarly, debian/package.emacsen-remove is installed into
- usr/lib/emacsen-common/packages/remove/package . And similarly,
- debian/package.emacsen-startup is installed into
- etc/emacs/site-start.d/50<package>.el (by default).
- =head1 OPTIONS
- =over 4
- =item B<-n>, B<--noscripts>
- Do not modify postinst/prerm scripts.
- =item B<--priority=>I<n>
- Sets the priority number of a site-start.d file. Default is 50.
- =item B<--flavor=>I<foo>
- Sets the flavor a site-start.d file will be installed in. Default is
- "emacs", alternatives include "xemacs" and "emacs20".
- =back
- =head1 NOTES
- Note that this command is not idempotent. "dh_clean -k" should be called
- between invocations of this command. Otherwise, it may cause multiple
- instances of the same text to be added to maintainer scripts.
- =cut
 -#
 -# Registration with emacsen-common.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- if (! defined $dh{PRIORITY}) {
-       $dh{PRIORITY}=50;
 -if (! defined $dh{number}) {
 -      $dh{number}=50;
--}
- if (! defined $dh{FLAVOR}) {
-       $dh{FLAVOR}='emacs';
 -if (! defined $dh{flavor}) {
 -      $dh{flavor}='emacs';
--}
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
--
-       my $emacsen_install=pkgfile($package,"emacsen-install");
-       my $emacsen_remove=pkgfile($package,"emacsen-remove");
-       my $emacsen_startup=pkgfile($package,"emacsen-startup");
 -      $emacsen_install=pkgfile($PACKAGE,"emacsen-install");
 -      $emacsen_remove=pkgfile($PACKAGE,"emacsen-remove");
 -      $emacsen_startup=pkgfile($PACKAGE,"emacsen-startup");
--
--      if ($emacsen_install ne '') {
-               if (! -d "$tmp/usr/lib/emacsen-common/packages/install") {
-                       doit("install","-d","$tmp/usr/lib/emacsen-common/packages/install");
 -              if (! -d "$TMP/usr/lib/emacsen-common/packages/install") {
 -                      doit("install","-d","$TMP/usr/lib/emacsen-common/packages/install");
--              }
-               doit("install","-m0755",$emacsen_install,"$tmp/usr/lib/emacsen-common/packages/install/$package");
 -              doit("install","-m0755",$emacsen_install,"$TMP/usr/lib/emacsen-common/packages/install/$PACKAGE");
--      }
--
--      if ($emacsen_remove ne '') {
-               if (! -d "$tmp/usr/lib/emacsen-common/packages/remove") {
-                       doit("install","-d","$tmp/usr/lib/emacsen-common/packages/remove");
 -              if (! -d "$TMP/usr/lib/emacsen-common/packages/remove") {
 -                      doit("install","-d","$TMP/usr/lib/emacsen-common/packages/remove");
--              }
-               doit("install","-m0755","$emacsen_remove","$tmp/usr/lib/emacsen-common/packages/remove/$package");
 -              doit("install","-m0755","$emacsen_remove","$TMP/usr/lib/emacsen-common/packages/remove/$PACKAGE");
--      }
--      
--      if ($emacsen_startup ne '') {
-               if (! -d "$tmp/etc/$dh{FLAVOR}/site-start.d/") {
-                       doit("install","-d","$tmp/etc/$dh{FLAVOR}/site-start.d/");
 -              if (! -d "$TMP/etc/$dh{flavor}/site-start.d/") {
 -                      doit("install","-d","$TMP/etc/$dh{flavor}/site-start.d/");
--              }
-               doit("install","-m0644",$emacsen_startup,"$tmp/etc/$dh{FLAVOR}/site-start.d/$dh{PRIORITY}$package.el");
 -              doit("install","-m0644",$emacsen_startup,"$TMP/etc/$dh{flavor}/site-start.d/$dh{number}$PACKAGE.el");
--      }
--
--      if ($emacsen_install ne '' || $emacsen_remove ne '') {
--              if (! $dh{NOSCRIPTS}) {
-                       autoscript($package,"postinst","postinst-emacsen",
-                               "s/#PACKAGE#/$package/");
-                       autoscript($package,"prerm","prerm-emacsen",
-                               "s/#PACKAGE#/$package/");
 -                      autoscript($PACKAGE,"postinst","postinst-emacsen",
 -                              "s/#PACKAGE#/$PACKAGE/");
 -                      autoscript($PACKAGE,"prerm","prerm-emacsen",
 -                              "s/#PACKAGE#/$PACKAGE/");
--              }
--      }
- }
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
 -}     
diff --cc dh_installinit
index 5e4e1f351fd2e452ffc42245da97f31500a2e663,c43d24d9efe55c7eba82b696f9314969f019b8f3..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,181 -1,74 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installinit - install init scripts into package build directories
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installinit> [S<I<debhelper options>>] [B<--init-script=>I<scriptname>] [B<-n>] [B<-r>] [B<-d>] [S<B<--> I<params>>]
- =head1 DESCRIPTION
- dh_installinit is a debhelper program that is responsible for installing
- init scripts and associated defaults files into package build directories.
- It also automatically generates the postinst and postrm and prerm commands
- needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init
- scripts.
- If a file named debian/package.init exists, then it is installed into
- etc/init.d/package in the package build directory, with "package" replaced
- by the package name.
- If a file named debian/package.default exists, then it is installed into
- etc/default/package in the package build directory, with "package" replaced
- by the package name.
- =head1 OPTIONS
- =over 4
- =item B<-n>, B<--noscripts>
- Do not modify postinst/postrm/prerm scripts.
- =item B<-r>, B<--no-restart-on-upgrade>
- Do not restart init script on upgrade.
- =item B<--no-start>
- Do not start the init script on install or upgrade, or stop it on removal.
- Only call update-rc.d. Useful for rcS scripts.
- =item B<-d>, B<--remove-d>
- Remove trailing "d" from the name of the package, and use the result for the
- filename the init script is installed as in etc/init.d/ , and the default file
- is installed as in etc/default/ . This may be useful for daemons with names
- ending in "d". (Note: this takes precedence over the --init-script parameter
- described below.)
- =item B<-u>I<params> B<--update-rcd-params=>I<params>
- =item B<--> I<params>
- Pass "params" to L<update-rc.d(8)>. If not specified, "defaults" will be
- passed to L<update-rc.d(8)>.
- =item B<--init-script=>I<scriptname>
- Use "scriptname" as for the filename the init script is installed as in
- etc/init.d/ (and also use it as the filename for the defaults file, if it
- is installed). This is useful if you need to have an init script with a name
- different from the package's name. Note that if you use this parameter,
- dh_installinit will look to see if a file in the debian/ directory exists
- that looks like "package.scriptname" and if so will install it as the init
- script in preference to the files it normally installs. This feature is really
- only useful if you need a single package to install more than one init script.
- =back
- =head1 NOTES
- Note that this command is not idempotent. "dh_clean -k" should be called
- between invocations of this command. Otherwise, it may cause multiple
- instances of the same text to be added to maintainer scripts.
- =cut
 -#
 -# Install debian/init[.d], and set up the postinst and postrm for init
 -# scripts.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
--
--      # Figure out what filename to install it as.
--      my $script;
--      if ($dh{D_FLAG}) {
--              # -d on the command line sets D_FLAG. We will 
--              # remove a trailing 'd' from the package name and 
--              # use that as the name.
-               $script=$package;
 -              $script=$PACKAGE;
--              if ($script=~m/(.*)d$/) {
--                      $script=$1;
--              }
--              else {
-                       warning("\"$package\" has no final d' in its name, but -d was specified.");
 -                      warning("\"$PACKAGE\" has no final d' in its name, but -d was specified.");
--              }
--      }       
--      elsif ($dh{INIT_SCRIPT}) {
--              $script=$dh{INIT_SCRIPT};
--      }
--      else {
-               $script=$package;
 -              $script=$PACKAGE;
--      }       
-       my $init=pkgfile($package,$script) || pkgfile($package,"init") ||
-             pkgfile($package,"init.d");
-       my $default=pkgfile($package,'default');
--
-       if ($default ne '') {
-               if (! -d "$tmp/etc/default") {
-                       doit("install","-d","$tmp/etc/default");
-               }
-               doit("install","-p","-m644",$default,"$tmp/etc/default/$script");
-       }
 -      $init=pkgfile($PACKAGE,$script) || pkgfile($PACKAGE,"init") ||
 -            pkgfile($PACKAGE,"init.d");
--
--      if ($init ne '') {
-               if (! -d "$tmp/etc/init.d") {
-                       doit("install","-d","$tmp/etc/init.d");
 -              if (! -d "$TMP/etc/init.d") {
 -                      doit("install","-d","$TMP/etc/init.d");
--              }
--
-               doit("install","-p","-m755",$init,"$tmp/etc/init.d/$script");
 -              doit("install","-p","-m755",$init,"$TMP/etc/init.d/$script");
--
--              # This is set by the -u "foo" command line switch, it's
--              # the parameters to pass to update-rc.d. If not set,
--              # we have to say "defaults".
--              my $params='';
--              if (defined($dh{U_PARAMS})) {
--                      $params=join(' ',@{$dh{U_PARAMS}});
--              }       
--              if ($params eq '') {
--                      $params="defaults";
--              }
--
--              if (! $dh{NOSCRIPTS}) {
-                       if (! $dh{NO_START}) {
-                               # update-rc.d, and start script
-                               autoscript($package,"postinst", "postinst-init",
 -                      # -r on the command line sets R_FLAG. If it's set, there
 -                      # is no restart on upgrade.
 -                      if ($dh{R_FLAG}) {
 -                              autoscript($PACKAGE,"postinst","postinst-init-norestart",
--                                      "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                       
-                               if ($dh{R_FLAG}) {
-                                       # stops script only on remove
-                                       autoscript($package,"prerm","prerm-init-norestart",
-                                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                               }
-                               else {
-                                       # always stops script
-                                       autoscript($package,"prerm","prerm-init",
-                                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                               }
 -                              autoscript($PACKAGE,"postrm","postrm-init",
 -                                      "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
--                      }
--                      else {
-                               # just update-rc.d
-                               autoscript($package,"postinst", "postinst-init-nostart",
 -                              autoscript($PACKAGE,"postinst","postinst-init",
 -                                      "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
 -                              autoscript($PACKAGE,"postrm","postrm-init",
 -                                      "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
 -                              autoscript($PACKAGE,"prerm","prerm-init",
--                                      "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
--                      }
-                       # removes rc.d links
-                       autoscript($package,"postrm","postrm-init",
-                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
--              }
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installmenu
index 420b2164545c8971a5fa07e48cc7f4ee9f5c4545,c077f21583991547577963e46c04e9b264d21c13..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,91 -1,45 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installmenu - install debian menu files into package build directories
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installmenu> [S<B<debhelper options>>] [B<-n>]
- =head1 DESCRIPTION
- dh_installmenu is a debhelper program that is responsible for installing
- files used by the debian menu package into package build directories.
- It also automatically generates the postinst and postrm commands needed to
- interface with the debian menu package. See L<dh_installdeb(1)> for an
- explanation of how this works.
- If a file named debian/package.menu exists, then it is installed into
- usr/lib/menu/package in the package build directory. This is a debian menu
- file. See L<menufile(5L)> for its format.
- If a file named debian/package.menu-method exits, then it is installed into
- etc/menu-methods/package in the package build directory. This is a debian
- menu method file.
- =head1 OPTIONS
- =over 4
- =item B<-n>, B<--noscripts>
- Do not modify postinst/postrm scripts.
- =back
- =cut
 -#
 -# Integration with debian menu system:
 -#
 -# If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE
 -# If debian/menu-method file exists, save it to 
 -# $TMP/etc/menu-methods/$PACKAGE
 -#
 -# Also, add to postinst and postrm.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $menu=pkgfile($package,"menu");
-       my $menu_method=pkgfile($package,"menu-method");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $menu=pkgfile($PACKAGE,"menu");
 -      $menu_method=pkgfile($PACKAGE,"menu-method");
--      
--      if ($menu ne '') {
-               if (! -d "$tmp/usr/lib/menu") {
-                       doit("install","-d","$tmp/usr/lib/menu");
 -              if (! -d "$TMP/usr/lib/menu") {
 -                      doit("install","-d","$TMP/usr/lib/menu");
--              }
-               doit("install","-p","-m644",$menu,"$tmp/usr/lib/menu/$package");
 -              doit("install","-p","-m644",$menu,"$TMP/usr/lib/menu/$PACKAGE");
--              
--              # Add the scripts if a menu-method file doesn't exist.
--              # The scripts for menu-method handle everything these do, too.
--              if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
-                       autoscript($package,"postinst","postinst-menu");
-                       autoscript($package,"postrm","postrm-menu")
 -                      autoscript($PACKAGE,"postinst","postinst-menu");
 -                      autoscript($PACKAGE,"postrm","postrm-menu")
--              }
--      }
--
--      if ($menu_method ne '') {
-               if (!-d "$tmp/etc/menu-methods") {
-                       doit("install","-d","$tmp/etc/menu-methods");
 -              if (!-d "$TMP/etc/menu-methods") {
 -                      doit("install","-d","$TMP/etc/menu-methods");
--              }
-               doit("install","-p",$menu_method,"$tmp/etc/menu-methods/$package");
 -              doit("install","-p",$menu_method,"$TMP/etc/menu-methods/$PACKAGE");
--
--              if (! $dh{NOSCRIPTS}) {
-                       autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
-                       autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
 -                      autoscript($PACKAGE,"postinst","postinst-menu-method","s/#PACKAGE#/$PACKAGE/");
 -                      autoscript($PACKAGE,"postrm","postrm-menu-method","s/#PACKAGE#/$PACKAGE/");
--              }
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- L<update-menus(1)>
- L<menufile(5)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installmime
index 8ffd523621e7b756daa69eeff5cfef5649f9dd2f,7cada574762b86b44349556eea2fd0f8e23d796a..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,75 -1,22 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installmime - install mime files into package build directories
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installmime> [S<I<debhelper options>>] [B<-n>]
- =head1 DESCRIPTION
- dh_installmime is a debhelper program that is responsible for installing
- mime files into package build directories.
- It also automatically generates the postinst and postrm commands needed to
- interface with the debian mime-support package. See L<dh_installdeb(1)> for
- an explanation of how this works.
- If a file named debian/package.mime exists, then it is installed into
- usr/lib/mime/packages/package in the package build directory.
- =head1 OPTIONS
- =over 4
- =item B<-n>, B<--noscripts>
- Do not modify postinst/postrm scripts.
- =back
- =head1 NOTES
- Note that this command is not idempotent. "dh_clean -k" should be called
- between invocations of this command. Otherwise, it may cause multiple
- instances of the same text to be added to maintainer scripts.
- =cut
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $mime=pkgfile($package,"mime");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $mime=pkgfile($PACKAGE,"mime");
--      
--      if ($mime ne '') {
-               if (! -d "$tmp/usr/lib/mime/packages") {
-                       doit("install","-d","$tmp/usr/lib/mime/packages");
 -              if (! -d "$TMP/usr/lib/mime/packages") {
 -                      doit("install","-d","$TMP/usr/lib/mime/packages");
--              }
-               doit("install","-p","-m644",$mime,"$tmp/usr/lib/mime/packages/$package");
 -              doit("install","-p","-m644",$mime,"$TMP/usr/lib/mime/packages/$PACKAGE");
--
--              if (! $dh{NOSCRIPTS}) {
-                       autoscript($package,"postinst","postinst-mime");
-                       autoscript($package,"postrm","postrm-mime")
 -                      autoscript($PACKAGE,"postinst","postinst-mime");
 -                      autoscript($PACKAGE,"postrm","postrm-mime")
--              }
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installmodules
index 13fd8f5c66651e9e3da23897f581807ca2696cd9,0ee00dce7c86243bac06d7df6cac2611e7942360..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,94 -1,28 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installmodules - register modules with modutils
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- use File::Find;
- =head1 SYNOPSIS
- B<dh_installmodules> [S<I<debhelper options>>] [B<-n>]
- =head1 DESCRIPTION
- dh_installmodules is a debhelper program that is responsible for
- registering kernel modules with modutils.
- Files named debian/package.modules will be installed as
- etc/modutils/package in the package build directory.
- Then postinst and postrm commands are automatically generated to register
- the modules when the package is installed. See L<dh_installdeb(1)> for an
- explanation of how this works. Note that this will be done for any
- package this program acts on which has either the above-mentioned file, or
- has .o files in /lib/modules.
- =head1 OPTIONS
- =over 4
- =item B<-n>, B<--noscripts>
- Do not modify postinst/postrm scripts.
- =back
- =head1 NOTES
- Note that this command is not idempotent. "dh_clean -k" should be called
- between invocations of this command. Otherwise, it may cause multiple
- instances of the same text to be added to maintainer scripts.
- =cut
 -#
 -# Register modules with modutils.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
- # Returns true if there are any .o files in the passed directory.
- sub find_kernel_modules {
-       my $searchdir=shift;
-       my @results=();
-       return unless -d $searchdir;
-       find(sub { push @results, $_ if /\.o$/ }, $searchdir);
-       return @results > 0;
- }
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $file=pkgfile($package,"modules");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $file=pkgfile($PACKAGE,"modules");
--
-       if (! -e $tmp) {
-               doit("install","-d",$tmp);
 -      if (! -e $TMP) {
 -              doit("install","-d",$TMP);
--      }
--
--      if ($file) {
-               if (! -e "$tmp/etc/modutils") {
-                       doit("install","-d","$tmp/etc/modutils");
 -              if (! -e "$TMP/etc/modutils") {
 -                      doit("install","-d","$TMP/etc/modutils");
 -                      doit("install","-m","0644",$file,"$TMP/etc/modutils/$PACKAGE");
--              }
-               doit("install","-m","0644",$file,"$tmp/etc/modutils/$package");
-       }
-       if (! $dh{NOSCRIPTS} &&
-           ($file || find_kernel_modules("$tmp/lib/modules"))) {
-                       autoscript($package,"postinst","postinst-modules","s/#PACKAGE#/$package/");
-                       autoscript($package,"postrm","postrm-modules","s/#PACKAGE#/$package/");
 -              
 -              if (! $dh{NOSCRIPTS}) {
 -                      autoscript($PACKAGE,"postinst","postinst-modules","s/#PACKAGE#/$PACKAGE/");
 -                      autoscript($PACKAGE,"postrm","postrm-modules","s/#PACKAGE#/$PACKAGE/");
 -              }
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_installpam
index 0f251798d4e6c918f912e36a5847e2138f339fd5,897fd7d85e54e729bca84cc21d64372098359d15..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,50 -1,21 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_installpam - install pam support files
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_installpam> [S<I<debhelper options>>] [B<-n>]
- =head1 DESCRIPTION
- dh_installpam is a debhelper program that is responsible for installing
- files used by PAM into package build directories.
- If a file named debian/package.pam exists, then it is installed into
- etc/pam.d/package in the package build directory.
- =cut
 -#
 -# Integration with debian pam system:
 -#
 -# If debian/pam file exists, save it to $TMP/etc/pam.d/$PACKAGE
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $pam=pkgfile($package,"pam");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $pam=pkgfile($PACKAGE,"pam");
--      
--      if ($pam ne '') {
-               if (! -d "$tmp/etc/pam.d") {
-                       doit("install","-d","$tmp/etc/pam.d");
 -              if (! -d "$TMP/etc/pam.d") {
 -                      doit("install","-d","$TMP/etc/pam.d");
--              }
-               doit("install","-p","-m644",$pam,"$tmp/etc/pam.d/$package");
 -              doit("install","-p","-m644",$pam,"$TMP/etc/pam.d/$PACKAGE");
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_link
index 6cb889cdd79ea3b92132f2f9ee0ca79cdbc51cbb,1f6299aa932feaf4a73eef334ea55f06b14f237e..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,181 -1,74 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_link - create symlinks in package build directories
- =cut
- use strict;
- use File::Find;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_link> [S<I<debhelper options>>] [B<-A>] [S<I<source destination ...>>]
- =head1 DESCRIPTION
- dh_link is a debhelper program that creates symlinks in package build
- directories.
- dh_link accepts a list of pairs of source and destination files. The source
- files are the already existing files that will be symlinked from. The
- destination files are the symlinks that will be created. There B<must> be
- an equal number of source and destination files specified.
- The list can be specified in two ways. A file named debian/package.links
- can list pairs of files. If you use this file, you should put each pair
- of files on its own line, and separate the files within the pair with
- whitespace. Also, pairs of files can be specified as parameters - these
- pairs will only be created in the package build directory of the first
- package dh_link is told to act on. By default, this is the first binary
- package in debian/control, but if you use -p, -i, or -a flags, it will be
- the first package specified by those flags.
- Be sure you B<do> specify the full filename to both the source and
- destination files (unlike you would do if you were using something like
- L<ln(1)>).
- dh_link will generate symlinks that comply with debian policy - absolute
- when policy says they should be absolute, and relative links with as short
- a path as possible. It will also create any subdirectories it needs to to put
- the symlinks in.
- dh_link also scans the package build tree for existing symlinks which do not
- conform to debian policy, and corrects them (v4 only).
- =head1 OPTIONS
- =over 4
- =item B<-A>, B<--all>
- Create any links specified by command line parameters in ALL packages
- acted on, not just the first.
- =item I<source destination ...>
- Create a file named "destination" as a link to a file named "source". Do
- this in the package build directory of the first package acted on.
- (Or in all packages if -A is specified.)
- =back
- =head1 EXAMPLES
-  dh_link usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
- Make bar.1 be a symlink to foo.1
-  dh_link var/lib/foo usr/lib/foo \
-    usr/X11R6/man/man1/foo.1x usr/share/man/man1/bar.1
- Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to
- the X man page foo.1x
- =cut
 -#
 -# Generate symlinks in debian packages, reading debian/links. The
 -# file contains pairs of files and symlinks.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
-       my $file=pkgfile($package,"links");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
 -      $file=pkgfile($PACKAGE,"links");
--
-       my @links;
 -      undef @links;
--      if ($file) {
--              @links=filearray($file);
--      }
--
--      # Make sure it has pairs of symlinks and destinations. If it
--      # doesn't, $#links will be _odd_ (not even, -- it's zero-based).
--      if (int($#links/2) eq $#links/2) {
--              error("$file lists a link without a destination.");
--      }
--
-       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
 -      if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
--              push @links, @ARGV;
--      }
--
--      # Same test as above, including arguments this time.
--      if (int($#links/2) eq $#links/2) {
--              error("parameters list a link without a destination.");
--      }
--
-       # v4 only and only if there is a temp dir already
-       if (! compat(3) && -e $tmp) {
-               # Scan for existing links and add them to @links, so they
-               # are recreated policy conformant.
-               find(
-                       sub {
-                               return unless -l;
-                               my $dir=$File::Find::dir;
-                               $dir=~s/^\Q$tmp\E//;
-                               my $target = readlink($_);
-                               if ($target=~/^\//) {
-                                       push @links, $target;
-                               }
-                               else {
-                                       push @links, "$dir/$target";
-                               }
-                               push @links, "$dir/$_";
-                               doit("rm","-f",$_);
-                               
-                       },
-                       $tmp);
-       }
-       
--      while (@links) {
-               my $dest=pop @links;
-               my $src=pop @links;
 -              $dest=pop @links;
 -              $src=pop @links;
--
-               # Relavatize src and dest.
 -              # Relivatize src and dest.
--              $src=~s:^/::;
--              $dest=~s:^/::;
--
--              # Make sure the directory the link will be in exists.
-               my $basedir=dirname("$tmp/$dest");
 -              $basedir=Dh_Lib::dirname("$TMP/$dest");
--              if (! -e $basedir) {
--                      doit("install","-d",$basedir);
--              }
--              
--              # Policy says that if the link is all within one toplevel
--              # directory, it should be relative. If it's between
--              # top level directories, leave it absolute.
-               my @src_dirs=split(m:/+:,$src);
-               my @dest_dirs=split(m:/+:,$dest);
 -              @src_dirs=split(m:/+:,$src);
 -              @dest_dirs=split(m:/+:,$dest);
--              if ($src_dirs[0] eq $dest_dirs[0]) {
--                      # Figure out how much of a path $src and $dest
--                      # share in common.
-                       my $x;
--                      for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
--                      # Build up the new src.
--                      $src="";
--                      for (1..$#dest_dirs - $x) {
--                              $src.="../";
--                      }
--                      for ($x .. $#src_dirs) {
--                              $src.=$src_dirs[$_]."/";
--                      }
--                      $src=~s:/$::;
--              }
--              else {
--                      # Make sure it's properly absolute.
--                      $src="/$src";
--              }
--              
-               doit("ln","-sf",$src,"$tmp/$dest");
 -              doit("ln","-sf",$src,"$TMP/$dest");
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_listpackages
index f919ef6262bcc147d40753b8f68ddff513afca82,3ce48e0676d79d2309768256b782e8e83565f4b9..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,38 -1,8 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_listpackages - list binary packages debhelper will act on
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_listpackages> [S<I<debhelper options>>]
- =head1 DESCRIPTION
- dh_listpackages is a debhelper program that outputs a list of all binary
- packages debhelper commands will act on. If you pass it some options, it
- will change the list to match the packages other debhelper commands would
- act on if passed the same options.
- =cut
 -#
 -# Output a list of all packages debhelper will act on.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--print join("\n",@{$dh{DOPACKAGES}})."\n";
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_md5sums
index 6f794e7f670504266f5babce19ab7bad7dc64ba9,80b5f4794f9f3014af5d4621a40c2722f931ba61..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,95 -1,46 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_md5sums - generate DEBIAN/md5sums file
- =cut
 -#
 -# Generate a DEBIAN/md5sums file, that lists the md5sums of all files in the
 -# package.
--
- use strict;
--use Cwd;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_md5sums> [S<I<debhelper options>>] [B<-x>] [B<-X>I<item>] [B<--include-conffiles>]
- =head1 DESCRIPTION
- dh_md5sums is a debhelper program that is responsible for generating
- a DEBIAN/md5sums file, which lists the md5sums of each file in the package.
- These files are used by the debsums package.
- All files in DEBIAN/ are omitted from the md5sums file, as are all
- conffiles (unless you use the --include-conffiles switch).
- The md5sums file is installed with proper permissions and ownerships.
- =head1 OPTIONS
- =over 4
- =item B<-x>, B<--include-conffiles>
- Include conffiles in the md5sums list. Note that this information is
- redundant since it is included elsewhere in debian packages.
- =item B<-X>I<item>, B<--exclude=>I<item>
- Exclude files that contain "item" anywhere in their filename from
- being listed in the md5sums file.
- =back
- =cut
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
--
-       if (! -d "$tmp/DEBIAN") {
-               doit("install","-d","$tmp/DEBIAN");
 -      if (! -d "$TMP/DEBIAN") {
 -              doit("install","-d","$TMP/DEBIAN");
--      }
--
--      # Check if we should exclude conffiles.
--      my $exclude="";
-       if (! $dh{INCLUDE_CONFFILES} && -r "$tmp/DEBIAN/conffiles") {
 -      if (! $dh{INCLUDE} && -r "$TMP/DEBIAN/conffiles") {
--              # Generate exclude regexp.
-               open (CONFF,"$tmp/DEBIAN/conffiles");
 -              open (CONFF,"$TMP/DEBIAN/conffiles");
--              while (<CONFF>) {
--                      chomp;
--                      s/^\///;
--                      $exclude.="! -path \"$_\" ";
--              }
--              close CONFF;
--      }
--      
--      # See if we should exclude other files.
--      if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
--              $exclude.="! \\( $dh{EXCLUDE_FIND} \\) ";
--      }
--      
-       my $olddir=getcwd();
-       complex_doit("cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null");
 -      $olddir=getcwd();
 -      complex_doit("cd $TMP >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir >/dev/null");
--      # If the file's empty, no reason to waste inodes on it.
-       if (-z "$tmp/DEBIAN/md5sums") {
-               doit("rm","-f","$tmp/DEBIAN/md5sums");
 -      if (-z "$TMP/DEBIAN/md5sums") {
 -              doit("rm","-f","$TMP/DEBIAN/md5sums");
--      }
--      else {
-               doit("chmod",644,"$tmp/DEBIAN/md5sums");
-               doit("chown","0.0","$tmp/DEBIAN/md5sums");
 -              doit("chmod",644,"$TMP/DEBIAN/md5sums");
 -              doit("chown","root.root","$TMP/DEBIAN/md5sums");
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_strip
index 9e107f46ba867603317fdd61709ddd2e11495450,9d6ab050fde217db979de2c5ed5e562fb0cbf7c4..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,154 -1,71 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_strip - strip executables, shared libraries, and some static libraries
- =cut
 -#
 -# Strip files.
--
- use strict;
--use File::Find;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>]
- =head1 DESCRIPTION
- dh_strip is a debhelper program that is responsible for stripping
- executables, shared libraries, and static libraries that are not used for
- debugging.
- This program examines your package build directories and works out what
- to strip on its own. It uses L<file(1)> and file permisions and filenames
- to figure out what files are shared libraries (*.so), executable binaries,
- and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and
- strips each as much as is possible. (Which is not at all for debugging
- libraries.) In general it seems to make very good guesses, and will do the
- right thing in almost all cases.
- Since it is very hard to automatically guess if a file is a
- module, and hard to determine how to strip a module, dh_strip does not
- currently deal with stripping binary modules such as .o files.
- =head1 OPTIONS
- =over 4
- =item B<-X>I<item>, B<--exclude=>I<item>
- Exclude files that contain "item" anywhere in their filename from being
- stripped. You may use this option multiple times to build up a list of
- things to exclude.
- =back
- =head1 NOTES
- If the DEB_BUILD_OPTIONS environment variable contains "nostrip", nothing
- will be stripped, in accordance with Debian policy.
- =head1 CONFORMS TO
- Debian policy, version 3.0.1
- =cut
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
- # This variable can be used to turn off stripping (see Policy).
- if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~ /nostrip/) {
-       exit;
- }
- # I could just use `file $_[0]`, but this is safer
- sub get_file_type {
-       my $file=shift;
-       open (FILE, '-|') # handle all filenames safely
-               || exec('file', $file)
-               || die "can't exec file: $!";
-       my $type=<FILE>;
-       close FILE;
-       return $type;
- }
--
--# Check if a file is an elf binary, shared library, or static library,
--# for use by File::Find. It'll fill the following 3 arrays with anything
--# it finds:
--my (@shared_libs, @executables, @static_libs);
--sub testfile {
--      return if -l $_ or -d $_; # Skip directories and symlinks always.
--
--      # See if we were asked to exclude this file.
--      # Note that we have to test on the full filename, including directory.
-       my $fn="$File::Find::dir/$_";
-       foreach my $f (@{$dh{EXCLUDE}}) {
 -      $fn="$File::Find::dir/$_";
 -      foreach $f (@{$dh{EXCLUDE}}) {
--              return if ($fn=~m/\Q$f\E/);
--      }
-       # Is it a debug library in a debug subdir?
-       return if $fn=~m/debug\/.*\.so/;
--
--      # Does its filename look like a shared library?
--      if (m/.*\.so.*?/) {
--              # Ok, do the expensive test.
-               my $type=get_file_type($_);
 -              my $type=`file $_`;
--              if ($type=~m/.*ELF.*shared.*/) {
--                      push @shared_libs, $fn;
--                      return;
--              }
--      }
--      
--      # Is it executable? -x isn't good enough, so we need to use stat.
-       my (undef,undef,$mode,undef)=stat(_);
 -      (undef,undef,$mode,undef)=stat(_);
--      if ($mode & 0111) {
--              # Ok, expensive test.
-               my $type=get_file_type($_);
-               if ($type=~m/.*ELF.*(executable|shared).*/) {
 -              my $type=`file $_`;
 -              if ($type=~m/.*ELF.*executable.*/) {
--                      push @executables, $fn;
--                      return;
--              }
--      }
--      
--      # Is it a static library, and not a debug library?
-       if (m/lib.*\.a$/ && ! m/.*_g\.a$/) {
 -      if (m/lib.*\.a/ && ! m/.*_g\.a/) {
--              push @static_libs, $fn;
--              return;
--      }
--}
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
-       my $tmp=tmpdir($package);
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -      $TMP=tmpdir($PACKAGE);
--
--      @shared_libs=@executables=@static_libs=();
-       find(\&testfile,$tmp);
 -      find(\&testfile,$TMP);
--
--      foreach (@shared_libs) {
--              # Note that all calls to strip on shared libs
--              # *must* inclde the --strip-unneeded.
-               doit("strip","--remove-section=.comment",
-                       "--remove-section=.note","--strip-unneeded",$_);
 -              doit("strip","--remove-section=.comment","--remove-section=.note","--strip-unneeded",$_);
--      }
--      
--      foreach (@executables) {
-               doit("strip","--remove-section=.comment",
-                       "--remove-section=.note",$_);
 -              doit("strip","--remove-section=.comment","--remove-section=.note",$_);
--      }
--
--      foreach (@static_libs) {
--              doit("strip","--strip-debug",$_);
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_testdir
index 451b9aebcca223e3a54c12d8cde0cabbd1746fb4,6d9258db66e7e50b5272153b0f0c5d888e14c57e..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,53 -1,15 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_testdir - test directory before building debian package
- =cut
- use strict;
- use Debian::Debhelper::Dh_Lib;
- =head1 SYNOPSIS
- B<dh_testdir> [S<I<debhelper options>>] [S<I<file ...>>]
- =head1 DESCRIPTION
- dh_testdir tries to make sure that you are in the correct directory when
- building a debian package. It makes sure that the file debian/control
- exists, as well as any other files you specify. If not,
- it exits with an error.
- =head1 OPTIONS
- =over 4
- =item I<file ...>
- Test for the existence of these files too.
- =back
- =cut
 -#
 -# Checks to make sure we are building the package in the right directory.
 -# 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/share/debhelper" }
 -use Dh_Lib;
--init();
--
- foreach my $file ('debian/control', @ARGV) {
 -foreach $file ('debian/control',@ARGV) {
--      if (! -e $file) {
--              error("\"$file\" not found. Are you sure you are in the correct directory?");
--      }
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut
diff --cc dh_testversion
index a17f22e9ffe7f7add9a9f13be7c544bfc10af331,096aa9e1f136b31a72b23d6bd3be45393663b98a..0000000000000000000000000000000000000000
deleted file mode 100755,100755
+++ /dev/null
@@@ -1,84 -1,24 +1,0 @@@
--#!/usr/bin/perl -w
- =head1 NAME
- dh_testversion - ensure that the correct version of debhelper is installed
- =cut
- use Debian::Debhelper::Dh_Lib;
- use Debian::Debhelper::Dh_Version; # contains the version number of debhelper.
- =head1 SYNOPSIS
- B<dh_testversion> [S<I<debhelper options>>] [I<operator>] [I<version>]
- =head1 DESCRIPTION
- Note: This program is deprecated. You should use build dependencies
- instead.
- dh_testversion compares the version of debhelper against the version you
- specify, and if the condition is not met, exits with an error message.
- You can use this in your debian/rules files if a new debhelper feature is
- introduced, and your package requires that feature to build correctly. Use
- debhelper's changelog to figure out the version you need.
- Be sure not to overuse dh_testversion. If debhelper version 9.5
- introduces a new dh_autofixbugs command, and your package uses it, then if
- someone tries to build it with debhelper 1.0, the build will fail anyway when
- dh_autofixbugs cannot be found, so there is no need for you to use
- dh_testversion.
- =head1 OPTIONS
- =over 4
- =item I<operator>
- Optional comparison operator used in comparing the versions. If not 
- specified, ">=" is used. For descriptions of the comparison operators, see 
- dpkg --help.
- =item I<version>
- Version number to compare against the current version of debhelper. If not
- specified, dh_testversion does nothing.
- =back
- =cut
 -#
 -# Debhelper version check.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
 -use Dh_Version; # contains the version number of debhelper.
--init();
--
--my($compare, $ver);
--
--if ($#ARGV > 0) {
--      $compare=shift;
--      $ver=shift;
--}
--elsif ($#ARGV eq 0) {
--      $compare=">=";
--      $ver=shift;
--}
- warning("This program is deprecated, you should use build dependencies instead.");
--
--if (defined $compare and defined $ver) {
-       warning("Something like: \"Build-Depends: debhelper ($compare $ver)\"");
-       system('dpkg','--compare-versions',$Debian::Debhelper::Dh_Version::version,$compare,$ver) == 0 ||
-               error("debhelper version $Debian::Debhelper::Dh_Version::version is installed, but a version $compare $ver is needed to build this package.");
 -      system('dpkg','--compare-versions',$Dh_Version::version,$compare,$ver) == 0 ||
 -              error("debhelper version $Dh_Version::version is installed, but a version $compare $ver is needed to build this package.");
--}
- =head1 SEE ALSO
- L<debhelper(7)>
- This program is a part of debhelper.
- =head1 AUTHOR
- Joey Hess <joeyh@debian.org>
- =cut