From: unknown <unknown>
Date: Mon, 28 Jul 2003 18:44:17 +0000 (+0000)
Subject: r748: This commit was manufactured by cvs2svn to create tag
X-Git-Tag: debian_version_2_0_42~1
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f1681fdd2db54054850a890b5300605c0d71d1f7;p=debhelper.git

r748: This commit was manufactured by cvs2svn to create tag
'debian_version_2_0_42'.
---

f1681fdd2db54054850a890b5300605c0d71d1f7
diff --cc autoscripts/postinst-info
index 71ffa19,59881a1..0000000
deleted file mode 100644,100644
--- a/autoscripts/postinst-info
+++ /dev/null
@@@ -1,3 -1,1 +1,0 @@@
- if [ "$1" = "configure" ]; then
- 	install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
- fi
 -install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
diff --cc autoscripts/postinst-info-nosection
index ffef863,cba27d2..0000000
deleted file mode 100644,100644
--- a/autoscripts/postinst-info-nosection
+++ /dev/null
@@@ -1,3 -1,1 +1,0 @@@
- if [ "$1" = "configure" ]; then
- 	install-info --quiet #FILE#
- fi
 -install-info --quiet #FILE#
diff --cc autoscripts/prerm-info
index b3f53cc,b3f53cc..0000000
deleted file mode 100644,100644
--- a/autoscripts/prerm-info
+++ /dev/null
@@@ -1,1 -1,1 +1,0 @@@
--install-info --quiet --remove #FILE#
diff --cc dh_builddeb
index 3d9f9d8,04c3570..0000000
deleted file mode 100755,100755
--- a/dh_builddeb
+++ /dev/null
@@@ -1,79 -1,17 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_builddeb - build debian packages
- 
- =cut
- 
- use strict;
- use Debian::Debhelper::Dh_Lib;
- 
- =head1 SYNOPSIS
- 
- B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--filename=>I<name>] [S<B<--> I<params>>]
- 
- =head1 DESCRIPTION
- 
- dh_builddeb simply calls L<dpkg-deb(8)> to build a debian package or
- packages.
- 
- =head1 OPTIONS
- 
- =over 4
- 
- =item B<--destdir=>I<directory>
- 
- Use this if you want the generated .deb files to be put in a directory
- other than the default of ".."
- 
- =item B<--filename=>I<name>
- 
- Use this if you want to force the generated .deb file to have a particular
- file name. Does not work well if more than one .deb is generated!
- 
- =item B<-u>I<params>
- 
- =item B<--> I<params>
- 
- Pass I<params> to L<dpkg-deb(1)> when it is used to build the
- package.
- 
- =back
- 
- =cut
 -#
 -# Build the .deb package, assuming all the files are set up.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
--# Set the default destination directory.
--if (! defined $dh{DESTDIR}) {
--	$dh{DESTDIR}='..';
- }
- 
- if (! defined $dh{FILENAME}) {
- 	$dh{FILENAME}='';
- }
- else {
- 	$dh{FILENAME}="/$dh{FILENAME}";
--}
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
- 	my $tmp=tmpdir($package);
- 	if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
- 		complex_doit("find $tmp -name $_ | xargs rm -rf")
- 			foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
- 	}
- 	doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -	$TMP=tmpdir($PACKAGE);
 -	doit("dpkg","--build",$TMP,$dh{DESTDIR});
--}
- 
- =head1 SEE ALSO
- 
- L<debhelper(7)>
- 
- This program is a part of debhelper.
- 
- =head1 AUTHOR
- 
- Joey Hess <joeyh@debian.org>
- 
- =cut
diff --cc dh_gencontrol
index 4e9ff3e,a2d152c..0000000
deleted file mode 100755,100755
--- a/dh_gencontrol
+++ /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 d28277c,5b872ac..0000000
deleted file mode 100755,100755
--- a/dh_installcron
+++ /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_installdeb
index 9527ff2,d3eebe7..0000000
deleted file mode 100755,100755
--- a/dh_installdeb
+++ /dev/null
@@@ -1,117 -1,55 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_installdeb - install files into the DEBIAN directory
- 
- =cut
- 
- use strict;
- use Debian::Debhelper::Dh_Lib;
- 
- =head1 SYNOPSIS
- 
- B<dh_installdeb> [S<I<debhelper options>>]
- 
- =head1 DESCRIPTION
- 
- dh_installdeb is a debhelper program that is responsible for installing
- files into the DEBIAN directories in package build directories with the
- correct permissions.
- 
- dh_installdeb automatically installs the following files from debian/ into
- the DEBIAN directory:
-   package.postinst
-   package.preinst
-   package.postrm
-   package.prerm
-   package.shlibs
-   package.conffiles
- 
- The postinst, preinst, postrm, and prerm are handled specially: If a
- corresponding file named debian/package.script.debhelper exists, the contents
- of that file are merged into the script as follows: If the script exists,
- then anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper
- file is inserted. If the script does not exist, then a script is generated
- from the .debhelper file. The .debhelper files are created by other debhelper
- programs, such as L<dh_installmenu(1)>, and are shell script fragments.
- 
- In V3 compatibility mode and higher, all files in the etc/ directory in a
- package will automatically be flagged as conffiles by this program, so
- there is no need to list them manually in package.conffiles.
- 
- =cut
 -#
 -# Install files from debian/ into the package's DEBIAN directory.
--
 -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);
--
- 	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");
--	}
--
--	# Install debian install scripts.
--	# If any .debhelper files exist, add them into the scripts.
- 	foreach my $file (qw{postinst preinst prerm postrm}) {
- 		my $f=pkgfile($package,$file);
 -	foreach $file (qw{postinst preinst prerm postrm}) {
 -		$f=pkgfile($PACKAGE,$file);
--		if ($f) {
- 			if (-f "debian/$ext$file.debhelper") {
 -			if (-f "debian/$EXT$file.debhelper") {
--				# Add this into the script, where it has
--				# #DEBHELPER#
- 				complex_doit("perl -pe 's~#DEBHELPER#~qx{cat debian/$ext$file.debhelper}~eg' < $f > $tmp/DEBIAN/$file");
 -				# TODO: do internally, no perl fork?
 -				complex_doit("perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < $f > $TMP/DEBIAN/$file");
--		        }
--			else {
--				# Just get rid of any #DEBHELPER# in the 
--				# script.
- 				complex_doit("sed s/#DEBHELPER#// < $f > $tmp/DEBIAN/$file");
 -				complex_doit("sed s/#DEBHELPER#// < $f > $TMP/DEBIAN/$file");
--			}
- 			doit("chown","0.0","$tmp/DEBIAN/$file");
- 			doit("chmod",755,"$tmp/DEBIAN/$file");
 -			doit("chown","root.root","$TMP/DEBIAN/$file");
 -			doit("chmod",755,"$TMP/DEBIAN/$file");
--		}
--		else {
--			# Auto-generate script header and add .debhelper
--			# content to it.
- 			if (-f "debian/$ext$file.debhelper") {
- 				complex_doit("printf '#!/bin/sh\nset -e\n' > $tmp/DEBIAN/$file");
- 				complex_doit("cat debian/$ext$file.debhelper >> $tmp/DEBIAN/$file");
- 				doit("chown","0.0","$tmp/DEBIAN/$file");
- 				doit("chmod",755,"$tmp/DEBIAN/$file");
 -			if (-f "debian/$EXT$file.debhelper") {
 -				complex_doit("echo '#!/bin/sh -e' > $TMP/DEBIAN/$file");
 -				complex_doit("cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file");
 -				doit("chown","root.root","$TMP/DEBIAN/$file");
 -				doit("chmod",755,"$TMP/DEBIAN/$file");
--			}
--		}
--	}
--
--	# Install non-executable files
- 	foreach my $file (qw{shlibs conffiles}) {
- 		my $f=pkgfile($package,$file);
 -	foreach $file (qw{shlibs conffiles}) {
 -		$f=pkgfile($PACKAGE,$file);
--		if ($f) {
- 			doit("install","-o",0,"-g",0,"-m",644,"-p",$f,"$tmp/DEBIAN/$file");
- 		}
- 	}
- 
- 	# Automatic conffiles registration: If it is in /etc, it is a
- 	# conffile.
- 	if (! compat(2) && -d "$tmp/etc") {
- 		complex_doit("find $tmp/etc -type f -printf '/etc/%P\n' >> $tmp/DEBIAN/conffiles");
- 		# Anything found?
- 		if (-z "$tmp/DEBIAN/conffiles") {
- 			doit("rm", "-f", "$tmp/DEBIAN/conffiles");
- 		}
- 		else {
- 			doit("chmod", 644, "$tmp/DEBIAN/conffiles");
 -			doit("install","-o","root","-g","root","-m",644,"-p",$f,"$TMP/DEBIAN/$file");
--		}
--	}
--}
- 
- =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 3bd4ea8,7d5e49c..0000000
deleted file mode 100755,100755
--- a/dh_installdirs
+++ /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 80b83e6,3fbaf8b..0000000
deleted file mode 100755,100755
--- a/dh_installemacsen
+++ /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 5e4e1f3,c43d24d..0000000
deleted file mode 100755,100755
--- a/dh_installinit
+++ /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 420b216,c077f21..0000000
deleted file mode 100755,100755
--- a/dh_installmenu
+++ /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 8ffd523,7cada57..0000000
deleted file mode 100755,100755
--- a/dh_installmime
+++ /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 13fd8f5,0ee00dc..0000000
deleted file mode 100755,100755
--- a/dh_installmodules
+++ /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 0f25179,897fd7d..0000000
deleted file mode 100755,100755
--- a/dh_installpam
+++ /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_installwm
index 31ce63c,21ee630..0000000
deleted file mode 100755,100755
--- a/dh_installwm
+++ /dev/null
@@@ -1,104 -1,22 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_installwm - register a window manager
- 
- =cut
- 
- use strict;
- use Debian::Debhelper::Dh_Lib;
- 
- =head1 SYNOPSIS
- 
- B<dh_installwm> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [S<I<wm ...>>]
- 
- =head1 DESCRIPTION
- 
- dh_installwm is a debhelper program that is responsible for
- generating the postinst and postrm commands that register a window manager
- with L<update-alternatives(8)>
- 
- Any window manager programs specified as parameters will be registered in
- the first package dh_installwm 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.
- 
- Files named debian/package.wm can list other window manager programs to
- register.
- 
- =head1 OPTIONS
- 
- =over 4
- 
- =item B<--priority=>I<n>
- 
- Set the priority of the window manager. Default is 20, which is too low for
- most window managers; see the Debian Policy document for instructions on
- calculating the correct value.
- 
- =item B<-n>, B<--noscripts>
- 
- Do not modify postinst/postrm scripts. Turns this command into a no-op.
- 
- =item I<wm ...>
- 
- The commands used to run the window manager or window managers you want to
- register.
- 
- =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.
- 
- =back
- 
- =cut
 -#
 -# Add to postinst and postrm to register a window manager.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- if (! defined $dh{PRIORITY}) {
-         $dh{PRIORITY}=20;
- }
 -$wm=shift;
--
- if (@ARGV) {
- 	# This is here for backwards compatibility. If the filename doesn't
- 	# include a path, assume it's in /usr/X11R6/bin.
- 	if ($ARGV[0] !~ m:/:) {
- 		$ARGV[0]="/usr/X11R6/bin/$ARGV[0]";
- 	}
 -if ($wm eq '') {
 -	error("No window manager filename was specified.");
--}
- 
- foreach my $package (@{$dh{DOPACKAGES}}) {
- #	my $tmp=tmpdir($package);
- 	my $file=pkgfile($package,"wm");
- 
- 	my @wm;
- 	if ($file) {
- 		@wm=filearray($file, '.');
- 	}
--
- 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
- 		push @wm, @ARGV;
- 	}
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -#	$TMP=tmpdir($PACKAGE);
--
--	if (! $dh{NOSCRIPTS}) {
- 		foreach (@wm) {
- 			autoscript($package,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
- 			autoscript($package,"prerm","prerm-wm","s:#WM#:$_:");
- 		}
 -		autoscript($PACKAGE,"postinst","postinst-wm","s/#WM#/$wm/");
 -		autoscript($PACKAGE,"postrm","postrm-wm","s/#WM#/$wm/");
--	}
--}
- 
- =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 6cb889c,1f6299a..0000000
deleted file mode 100755,100755
--- a/dh_link
+++ /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 f919ef6,3ce48e0..0000000
deleted file mode 100755,100755
--- a/dh_listpackages
+++ /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_makeshlibs
index de9f782,41bf161..0000000
deleted file mode 100755,100755
--- a/dh_makeshlibs
+++ /dev/null
@@@ -1,183 -1,49 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_makeshlibs - automatically create shlibs file
- 
- =cut
- 
- use strict;
- use Debian::Debhelper::Dh_Lib;
- 
- =head1 SYNOPSIS
- 
- B<dh_makeshlibs> [S<I<debhelper options>>] [B<-m>I<major>] [B<-V>I<[dependancies]>] [B<-n>] [B<-X>I<item>]
- 
- =head1 DESCRIPTION
- 
- dh_makeshlibs is a debhelper program that automatically scans for shared
- libraries, and generates a shlibs file for the libraries it finds.
- 
- It also adds a call to ldconfig in the postinst and postrm scripts (in
- V3 mode and above only) to any packages which it finds shared libraries in.
- 
- =head1 OPTIONS
- 
- =over 4
- 
- =item B<-m>I<major>, B<--major=>I<major>
- 
- Instead of trying to guess the major number of the library with objdump,
- use the major number specified after the -m parameter. This is much less
- useful than it used to be, back in the bad old days when this program
- looked at library filenames rather than using objdump.
- 
- =item B<-V>, B<-V>I<dependancies>
- 
- =item B<--version-info>, B<--version-info=>I<dependancies>
- 
- By default, the shlibs file generated by this program does not make packages
- depend on any particular version of the package containing the shared
- library. It may be necessary for you to add some version dependancy
- information to the shlibs file. If -V is specified with no dependancy
- information, the current version of the package is plugged into a
- dependancy that looks like "packagename (>= packageversion)". If -V is
- specified with parameters, the parameters can be used to specify the exact
- dependancy information needed (be sure to include the package name).
- 
- Beware of using -V without any parameters; this is a conservative setting
- that always ensures that other packages' shared library dependencies are at
- least as tight as they need to be, so that if the maintainer screws up then
- they won't break. The flip side is that packages might end up with
- dependencies that are too tight and so find it harder to be upgraded.
- 
- =item B<-n>, B<--noscripts>
- 
- Do not modify postinst/postrm scripts.
- 
- =item B<-X>I<item>, B<--exclude=>I<item>
- 
- Exclude files that contain "item" anywhere in their filename or directory 
- from being treated as shared libraries.
- 
- =back
- 
- =head1 EXAMPLES
- 
-  dh_makeshlibs
- 
- Assuming this is a package named libfoobar1, generates a shlibs file that
- looks something like:
-  libfoobar 1 libfoobar1
- 
-  dh_makeshlibs -V
- 
- Assuming the current version of the package is 1.0-3, generates a shlibs
- file that looks something like:
-  libfoobar 1 libfoobar1 (>= 1.0-3)
- 
-  dh_makeshlibs -V 'libfoobar1 (>= 1.0)'
- 
- Generates a shlibs file that looks something like:
-   libfoobar 1 libfoobar1 (>= 1.0)
- 
- =cut
 -#
 -# Automatically generate shlibs files.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
- 
- foreach my $package (@{$dh{DOPACKAGES}}) {
- 	my $tmp=tmpdir($package);
- 
- 	my %seen;
- 	my $need_ldconfig = 0;
--
- 	doit("rm", "-f", "$tmp/DEBIAN/shlibs");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -	$TMP=tmpdir($PACKAGE);
--
- 	# So, we look for files or links to existing files with names that
- 	# match "*.so*". Matching *.so.* is not good enough because of
- 	# broken crap like db3. And we only look at real files not
- 	# symlinks, so we don't accidentually add shlibs data to -dev
- 	# packages. This may have a few false positives, which is ok,
- 	# because only if we can get a library name and a major number from
- 	# objdump is anything actually added.
- 	my $exclude='';
- 	if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
- 		$exclude="! \\( $dh{EXCLUDE_FIND} \\) ";
 -	if (-e "$TMP/DEBIAN/shlibs") {
 -		error("$TMP/DEBIAN/shlibs already exists.");
--	}
- 	open (FIND, "find $tmp -type f -name '*.so*' $exclude |");
- 	while (<FIND>) {
- 		my ($library, $major);
- 		my $objdump=`objdump -p $_`;
- 		if ($objdump=~m/\s+SONAME\s+(.+)\.so\.(.+)/) {
- 			# proper soname format
- 			$library=$1;
- 			$major=$2;
- 		}
- 		elsif ($objdump=~m/\s+SONAME\s+(.+)-(.+)\.so/) {
- 			# idiotic crap soname format
- 			$library=$1;
- 			$major=$2;
- 		}
--
 -	open (FIND, "find $TMP -type f -name '*.so.*' |");
 -	while (<FIND>) {
 -		chomp;
 -		($library, $major)=m#.*/(.*)\.so\.(\d*)\.?#;
--		if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') {
--			$major=$dh{M_PARAMS};
--		}
- 		
- 		if (! -d "$tmp/DEBIAN") {
- 			doit("install","-d","$tmp/DEBIAN");
 -		if (! -d "$TMP/DEBIAN") {
 -			doit("install","-d","$TMP/DEBIAN");
--		}
- 		my $deps=$package;
 -		$deps=$PACKAGE;
--		if ($dh{V_FLAG_SET}) {
--			if ($dh{V_FLAG} ne '') {
--				$deps=$dh{V_FLAG};
--			}	
--			else {
--				# Call isnative becuase it sets $dh{VERSION}
--				# as a side effect.
- 				isnative($package);
- 				my $version = $dh{VERSION};
- 				# Old compatability levels include the
- 				# debian revision, while new do not.
- 				if (! compat(3)) {
- 					# Remove debian version, if any.
- 					$version =~ s/-[^-]+$//;
- 				}
- 				$deps="$package (>= $version)";
 -				isnative($PACKAGE);
 -				$deps="$PACKAGE (>= $dh{VERSION})";
--			}
--		}
- 		if (defined($library) && defined($major) && defined($deps) &&
 -		if (defined($library) && defined($major) && defined($deps) && 
--		    $library ne '' && $major ne '' && $deps ne '') {
- 		    	$need_ldconfig=1;
- 		    	# Prevent duplicate lines from entering the file.
- 		    	my $line="$library $major $deps";
- 			if (! $seen{$line}) {
- 				$seen{$line}=1;
- 				complex_doit("echo '$line' >>$tmp/DEBIAN/shlibs");
- 			}
 -			complex_doit("echo '$library $major $deps' >>$TMP/DEBIAN/shlibs");
--		}
--	}
--	close FIND;
- 
- 	# New as of dh_v3.
- 	if (! compat(2) && ! $dh{NOSCRIPTS} && $need_ldconfig) {
- 		autoscript($package,"postinst","postinst-makeshlibs");
- 		autoscript($package,"postrm","postrm-makeshlibs");
- 	}
--
- 	if (-e "$tmp/DEBIAN/shlibs") {
- 		doit("chmod",644,"$tmp/DEBIAN/shlibs");
- 		doit("chown","0.0","$tmp/DEBIAN/shlibs");
 -	if (-e "$TMP/DEBIAN/shlibs") {
 -		doit("chmod",644,"$TMP/DEBIAN/shlibs");
 -		doit("chown","root.root","$TMP/DEBIAN/shlibs");
--	}
--}
- 
- =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 6f794e7,80b5f47..0000000
deleted file mode 100755,100755
--- a/dh_md5sums
+++ /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_movefiles
index 2c8a63f,7978163..0000000
deleted file mode 100755,100755
--- a/dh_movefiles
+++ /dev/null
@@@ -1,170 -1,82 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_movefiles - move files out of debian/tmp into subpackages
- 
- =cut
- 
- use strict;
- use Debian::Debhelper::Dh_Lib;
- 
- =head1 SYNOPSIS
- 
- B<dh_movefiles> [S<I<debhelper options>>] [B<--sourcedir=>I<dir>] [B<-X>I<item>] S<I<file ...>>]
- 
- =head1 DESCRIPTION
- 
- dh_movefiles is a debhelper program that is responsible for moving files
- out of debian/tmp or some other directory and into other package build
- directories. This may be useful if your package has a Makefile that installs
- everything into debian/tmp, and you need to break that up into subpackages.
- 
- Files named debian/package.files list the files to be moved, separated by
- whitespace. The filenames listed should be relative to debian/tmp/. You can
- also list directory names, and the whole directory will be moved. If you
- prefer, you can list the files to move on the command line and this will
- apply to the first package dh_movefiles is told to act on.
- 
- Note: dh_install is a much better program that can do everything this one can,
- and more.
- 
- =head1 OPTIONS
- 
- =over 4
- 
- =item B<--sourcedir=>I<dir>
- 
- Instead of moving files out of debian/tmp (the default), this option makes
- it move files out of some other directory. Since the entire contents of
- the sourcedir is moved, specifiying something like --sourcedir=/ is very
- unsafe, so to prevent mistakes, the sourcedir must be a relative filename;
- it cannot begin with a `/'.
- 
- =item B<-Xitem>, B<--exclude=item>
- 
- Exclude files that contain "item" anywhere in their filename from
- being installed.
- 
- =item I<file ...>
- 
- Lists files to move. The filenames listed should be relative to
- debian/tmp/. You can also list directory names, and the whole directory will
- be moved. It is an error to list files here unless you use -p, -i, or -a to
- tell dh_movefiles which subpackage to put them in.
- 
- =back
- 
- =head1 NOTES
- 
- Note that files are always moved out of debian/tmp by default (even if you
- have instructed debhelper to use a compatibility level higher than one,
- which does not otherwise use debian/tmp for anything at all). The idea
- behind this is that the package that is being built can be told to install
- into debian/tmp, and then files can be moved by dh_movefiles from that
- directory. Any files or directories that remain are ignored, and get
- deleted by dh_clean later.
- 
- =cut
 -#
 -# Move files out of debian/tmp, into subpackages.
--
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
--
- my $ret=0;
 -$ret=0;
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
- 	my $tmp=tmpdir($package);
- 	my $files=pkgfile($package,"files");
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -	$TMP=tmpdir($PACKAGE);
 -	$files=pkgfile($PACKAGE,"files");
--
- 	my $sourcedir="debian/tmp";
--	if ($dh{SOURCEDIR}) {
--		if ($dh{SOURCEDIR}=~m:^/:) {
--			error("The sourcedir must be a relative filename, not starting with `/'.");
--		}
--		$sourcedir=$dh{SOURCEDIR};
 -	}
 -	else {
 -		$sourcedir="debian/tmp";
--	}
--
--	if (! -d $sourcedir) {
--		error("$sourcedir does not exist.");
--	}
--
- 	my @tomove;
 -	@tomove=();
--
--        # debian/files has a different purpose, so ignore it.
- 	if ($files && $files ne "debian/files" ) {
- 		@tomove=filearray($files, $sourcedir);
 -	if ( $files && $files ne "debian/files" ) {
 -		@tomove=filearray($files);
--	}
--	
- 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
 -	if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
--		push @tomove, @ARGV;
--	}
--
- 	if (@tomove && $tmp eq $sourcedir) {
- 		error("I was asked to move files from $sourcedir to $sourcedir. Perhaps you should set DH_COMPAT=2?");
 -	if (@tomove && $TMP eq $sourcedir) {
 -		error("I was asked to move files from $sourcedir to $sourcedir.");
--	}
--
- 	# Now we need to expand wildcards in @tomove.
- 	# This is only necessary in pre-v3 land -- as of v3, the
- 	# expension is automatically done by filearray().
- 	if (@tomove && compat(2)) {
- 		my @filelist=();
 -	if (@tomove) {
 -		if (! -d $TMP) {
 -			doit("install","-d",$TMP);
 -		}
 -		# Now we need to expand wildcards in @tomove.
 -		@filelist=();
--		foreach (@tomove) {
--			push @filelist, glob("$sourcedir/$_");
--		}
- 		@tomove=@filelist;
- 	}
- 	else {
- 		# However, filearray() does not add the sourcedir,
- 		# which we need.
- 		@tomove = map { "$sourcedir/$_" } @tomove;
- 	}
- 
- 	if (@tomove) {
- 		if (! -d $tmp) {
- 			doit("install","-d",$tmp);
 -		
 -		# Order the files. First all real files, then symlinks. 
 -		# Putting symlinks last is a nice thing to do for library 
 -		# packages and doesn't affect much of anything else.
 -		doit("rm","-f","movelist");
 -		foreach (@filelist) {
 -			$file=$_;
 -			$ret=1 if (! -e $file && ! -l $file);
 -			$file=~s:^$sourcedir/+::;
 -			complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and ! -type l -print || true) >> movelist");
--		}
- 
- 		doit("rm","-f","debian/movelist");
- 		foreach (@tomove) {
- 			my $file=$_;
- 			if (! -e $file && ! -l $file && ! $dh{NO_ACT}) {
- 				$ret=1;
- 				warning("$file not found (supposed to put it in $package)");
- 			}
- 			$file=~s:^\Q$sourcedir\E/+::;
- 			my $cmd="(cd $sourcedir >/dev/null ; find $file ! -type d ";
- 			if ($dh{EXCLUDE_FIND}) {
- 				$cmd.="-a ! \\( $dh{EXCLUDE_FIND} \\) ";
- 			}
- 			$cmd.="-print || true) >> debian/movelist";
- 			complex_doit($cmd);
 -		foreach (@filelist) {
 -			$file=$_;
 -			$ret=1 if (! -e $file && ! -l $file);
 -			$file=~s:^$sourcedir/+::;
 -			complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and -type l -print || true) >> movelist");
--		}
- 		my $pwd=`pwd`;
- 		chomp $pwd;
- 		complex_doit("(cd $sourcedir >/dev/null ; tar --create --files-from=$pwd/debian/movelist --file -) | (cd $tmp >/dev/null ;tar xpf -)");
- 		# --remove-files is not used above because tar then doesn't
- 		# preserve hard links
- 		complex_doit("(cd $sourcedir >/dev/null ; cat $pwd/debian/movelist | xargs rm -f)");
- 		doit("rm","-f","debian/movelist");
 -		complex_doit("(cd $sourcedir >/dev/null ; tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP >/dev/null ;tar xpf -)");
 -		doit("rm","-f","movelist");
--	}
--}
--
--# If $ret is set, we wern't actually able to find some 
--# files that were specified to be moved, and we should
--# exit with the code in $ret. This program puts off 
--# exiting with an error until all files have been tried
--# to be moved, because this makes it easier for some 
--# packages that arn't always sure exactly which files need
--# to be moved.
--exit $ret;
- 
- =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 9e107f4,9d6ab05..0000000
deleted file mode 100755,100755
--- a/dh_strip
+++ /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_suidregister
index 3bc9bd9,dd01c2c..0000000
deleted file mode 100755,100755
--- a/dh_suidregister
+++ /dev/null
@@@ -1,127 -1,72 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_suidregister - obsolete suid registration program
- 
- =head1 SYNOPSIS
- 
- Do not run!
- 
- =head1 DESCRIPTION
- 
- This program used to register suid and sgid files with L<suidregister(1)>,
- but with the introduction of L<dpkg-statoverride(8)>, registration of files
- in this way is unnecessary, and even harmful, so this program should not be
- used.
- 
- =head1 CONVERTING TO STATOVERRIDE
- 
- Converting a package that uses this program to use the new statoverride
- mechanism is easy. Just remove the call to dh_suidregister from
- debian/rules, and add a versioned conflicts into your control file, as
- follows:
- 
-   Conflicts: suidmanager (<< 0.50)
- 
- The conflicts is only necessary if your package used to register things
- with suidmanager; if it did not, you can just remove the call to this
- program from your rules file.
- 
- =cut
 -#
 -# If no parameters are given, and no debian/suid files exists, scan for 
 -# suid/sgid files and suidregister them. 
 -#
 -# If there are parameters, or there is a debian/suid, register the files
 -# listed there.
--
- use strict;
- use Debian::Debhelper::Dh_Lib;
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
--init();
- 
- my $notused=1;
--
- foreach my $package (@{$dh{DOPACKAGES}}) {
- 	my $tmp=tmpdir($package);
- 	my $suid=pkgfile($package,"suid");
- 	my $tostrip='';
 -foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 -	$TMP=tmpdir($PACKAGE);
 -	$suid=pkgfile($PACKAGE,"suid");
--
- 	my @files;
 -	@files=();
--	if ($suid) {
- 		@files=filearray($suid, $tmp);
 -		@files=filearray($suid);
--	}
--
- 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
 -	if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
--		push @files, @ARGV;
--	}
--
--	if (! @files && ! $suid) {
--		# No files specified (and no empty debian/suid file), so
--		# guess what files to process.
- 		@files=split(/\n/,`find $tmp -type f -perm +6000`);
 -		@files=split(/\n/,`find $TMP -type f -perm +6000`);
--
- 		# Strip the debian working directory off of the filenames.
- 		$tostrip="$tmp/";
 -		# We will strip the debian working directory off of the
 -		# filenames.
 -		$tostrip="$TMP/";
--	}
--	else {
--		# We will strip leading /'s, so the user can feed this
--		# program either absolute filenames, or relative filenames,
--		# and it will do the right thing either way.
--		$tostrip="/";
--	}
--
- 	# Register files with suidregister.
- 	foreach my $file (@files) {
 -	foreach $file (@files) {
--		# Strip leading $tostrip from $file.
--		$file=~s/^$tostrip//;
--
- 		# Create the sed string that will be used to
 -		# Create the sed string that will be used to 
--		# fill in the blanks in the autoscript files.
--		# Fill with the owner, group, and perms of the file.
- 		my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$tmp/$file");
- 		# Now come up with the user and group names for the uid and
- 		# gid.
- 		my $user=getpwuid($uid);
 -		(undef,undef,$mode,undef,$uid,$gid,undef) = stat("$TMP/$file");
 -		# Now come up with the user and group names for the uid and gid.
 -		$user=getpwuid($uid);
--		if (! defined $user) {
--			warning("$file has odd uid $uid, not in /etc/passwd");
--			$user=$uid;
--		}
- 		my $group=getgrgid($gid);
 -		$group=getgrgid($gid);
--		if (! defined $group) {
--			warning("$file has odd gid $gid not in /etc/group");
--			$group=$gid;
--		}
- 		# Note that I have to print mode in ocal, stripping file
- 		# type.
- 		my $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$package/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
-                                    $mode & 07777);
- 		autoscript($package,"postinst","postinst-suid",$sedstr);
- 		autoscript($package,"postrm","postrm-suid","$sedstr");
- 	}
 -		# Note that I have to print mode in ocal, stripping file type.
 -		$sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
 -			        $mode & 07777);
--
- 	# Remove suid bits from files. This is delayed to this point, because
- 	# of a situation with hard linked files if it is done earlier.
- 	# See changelog for 2.0.77.
- 	foreach my $file (@files) {
- 		if ( -e "$tmp/$file") {
- 			doit("chmod","a-s","$tmp/$file");
 -		autoscript($PACKAGE,"postinst","postinst-suid",$sedstr);
 -		autoscript($PACKAGE,"postrm","postrm-suid","$sedstr");
 -		
 -		if ( -e "$TMP/$file") {
 -			doit("chmod","a-s","$TMP/$file");
--		}
- 	}
- 
- 	if (@files) {
- 		warning("This program should no longer be used. Please read the dh_suidregister(1) man page.");
- 		$notused=0;
--	}
- }
- 
- # Although they called it, it's not going to do anything.
- if ($notused) {
- 	warning("This program is obsolete, does nothing, and may be safely removed from your rules file.");
--}
- 
- =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 451b9ae,6d9258d..0000000
deleted file mode 100755,100755
--- a/dh_testdir
+++ /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_testroot
index 3468476,6ce2a13..0000000
deleted file mode 100755,100755
--- a/dh_testroot
+++ /dev/null
@@@ -1,36 -1,13 +1,0 @@@
--#!/usr/bin/perl -w
- 
- =head1 NAME
- 
- dh_testroot - ensure that a package is built as root
- 
- =head1 SYNOPSIS
- 
- B<dh_testroot> [S<I<debhelper options>>]
- 
- =head1 DESCRIPTION
- 
- dh_testroot simply checks to see if you are root. If not, it exits with an
- error. Debian packages must be built as root, though you can use 
- L<fakeroot(1)>
- 
- =cut
 -#
 -# Checks to make sure you are root.
--
- use strict;
- use Debian::Debhelper::Dh_Lib;
 -BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 -use Dh_Lib;
 -init();
--
 -# Test for uid = 0, not username of root, becuase
 -# some people rename root.
--if ($< != 0) {
- 	error("You must run this as root (or use fakeroot).");
 -	error("You must run this as root.");
--}
- 
- =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 a17f22e,096aa9e..0000000
deleted file mode 100755,100755
--- a/dh_testversion
+++ /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