diff options
-rw-r--r-- | .foo | 0 | ||||
-rwxr-xr-x | dh_gencontrol | 30 | ||||
-rw-r--r-- | dh_gencontrol.1 | 36 | ||||
-rwxr-xr-x | dh_getopt.pl | 57 | ||||
-rwxr-xr-x | dh_installdeb | 55 | ||||
-rw-r--r-- | dh_installdeb.1 | 50 | ||||
-rwxr-xr-x | dh_installinit | 74 | ||||
-rw-r--r-- | dh_installinit.1 | 62 | ||||
-rw-r--r-- | dh_movefiles.1 | 49 | ||||
-rwxr-xr-x | dh_shlibdeps | 28 | ||||
-rw-r--r-- | dh_shlibdeps.1 | 37 | ||||
-rw-r--r-- | dh_testversion.1 | 51 | ||||
-rw-r--r-- | dh_testversion.in | 23 | ||||
-rwxr-xr-x | examples/rules.indep | 78 |
14 files changed, 0 insertions, 630 deletions
diff --git a/dh_gencontrol b/dh_gencontrol deleted file mode 100755 index a2d152c4..00000000 --- a/dh_gencontrol +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/perl -w -# -# Generate and install the control file. Simple dpkg-gencontrol wrapper. - -BEGIN { push @INC, "debian", "/usr/share/debhelper" } -use Dh_Lib; -init(); - -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); - $EXT=pkgext($PACKAGE); - - $changelog=pkgfile($PACKAGE,'changelog'); - if (! $changelog) { - $changelog='debian/changelog'; - } - - if ( ! -d '$TMP/DEBIAN' ) { - doit("install","-o","root","-g","root","-d","$TMP/DEBIAN"); - } - - # Generate and install control file. - 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"); - - doit("chown","root.root","$TMP/DEBIAN/control"); -} diff --git a/dh_gencontrol.1 b/dh_gencontrol.1 deleted file mode 100644 index 79182619..00000000 --- a/dh_gencontrol.1 +++ /dev/null @@ -1,36 +0,0 @@ -.TH DH_GENCONTROL 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_gencontrol \- generate and install control file -.SH SYNOPSIS -.B dh_gencontrol -.I "[debhelper options] [-uparams]" -.SH "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. -.P -This program is merely a wrapper around -.BR dpkg-gencontrol (1) -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.TP -.B \-uparams, \--dpkg-gencontrol-params=params -Pass "params" to -.BR dpkg-gencontrol (1) -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.TP -.BR debhelper (1) -.TP -.BR dpkg-shlibdeps (1) -.SH "CONFORMS TO" -Debian policy, version 2.5.0.0 -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_getopt.pl b/dh_getopt.pl deleted file mode 100755 index 4d1d3903..00000000 --- a/dh_getopt.pl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -# -# Because the getopt() program is so horribly broken, I wrote my own argument -# processer that uses the find Getopt::Long module. This is used by all -# debhelper shell scripts. -# -# Joey Hess, GPL copyright 1998. - -BEGIN { push @INC, "debian", "/usr/lib/debhelper" } -use strict; -use Dh_Getopt; - -# This is a tricky (and nasty) bit: override the error() function, which -# comes from Dh_Lib, with one of our own so we print out the list of errors -# to the shell, which can do what it wants with them. -sub Dh_Getopt::error { my $message=shift; - print "DH_PARSE_ERROR='$message'\n"; - exit 1; -} - -# Parse options. -my %options=Dh_Getopt::parseopts(); - -# Change a few lists in %options into strings, -# generate some options that only need to be visible to the -# shell scripts so Dh_Getopt doesn't bother generating. -$options{DOPACKAGES}=join " ",@{$options{DOPACKAGES}}; -if ($#{$options{EXCLUDE}} > -1) { - $options{EXCLUDE_GREP}=join '|', @{$options{EXCLUDE}}; -} -$options{EXCLUDE}=join " ",@{$options{EXCLUDE}}; - -# Check to see if DH_VERBOSE environment variable was set, if so, -# make sure verbose is on. -if (defined $main::ENV{DH_VERBOSE}) { - if ($main::ENV{DH_VERBOSE} ne undef) { - $options{VERBOSE}=1; - } -} - -# Check to see if DH_NO_ACT environment variable was set, if so, -# make sure no act mode is on. -if (defined $main::ENV{DH_NO_ACT}) { - if ($main::ENV{DH_NO_ACT} ne undef) { - $options{NO_ACT}=1; - } -} - -# Now output everything, in a format suitable for a shell to eval it. -foreach (keys(%options)) { - if (defined $options{$_}) { - print "DH_$_='$options{$_}'\n"; - } -} - -# This sets $@ in the shell to whatever arguements remain. -print "set -- @ARGV\n" diff --git a/dh_installdeb b/dh_installdeb deleted file mode 100755 index d3eebe76..00000000 --- a/dh_installdeb +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/perl -w -# -# Install files from debian/ into the package's DEBIAN directory. - -BEGIN { push @INC, "debian", "/usr/share/debhelper" } -use Dh_Lib; -init(); - -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); - $EXT=pkgext($PACKAGE); - - 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 $file (qw{postinst preinst prerm postrm}) { - $f=pkgfile($PACKAGE,$file); - if ($f) { - if (-f "debian/$EXT$file.debhelper") { - # Add this into the script, where it has - # #DEBHELPER# - # 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"); - } - 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("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 $file (qw{shlibs conffiles}) { - $f=pkgfile($PACKAGE,$file); - if ($f) { - doit("install","-o","root","-g","root","-m",644,"-p",$f,"$TMP/DEBIAN/$file"); - } - } -} diff --git a/dh_installdeb.1 b/dh_installdeb.1 deleted file mode 100644 index 1d17b96c..00000000 --- a/dh_installdeb.1 +++ /dev/null @@ -1,50 +0,0 @@ -.TH DH_INSTALLDEB 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_installdeb \- install files into the DEBIAN directory -.SH SYNOPSIS -.B dh_installdeb -.I "[debhelper options]" -.SH "DESCRIPTION" -dh_installdeb is a debhelper program that is responsible for installing -files into the DEBIAN directory in package build directories with the -correct permissions. -.P -dh_installdeb automatically installs the following files from debian/ into -the DEBIAN directory: - postinst - preinst - postrm - prerm - shlibs - conffiles -.P -(For packages other than the first binary package listed in debian/control, -you must prefix these filenames with then name of the "package.", for example, -"foo.postinst". You can also prefix the filenames the same way for the first -binary package, for consitency.) -.P -The files postinst, preinst, postrm, and prerm are handled specially: If a -corresponding file named debian/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 -.BR dh_installmenu (1) -, and are shell script fragments. -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.BR debhelper (1) -.SH "CONFORMS TO" -Debian policy, version 2.5.0.0 -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_installinit b/dh_installinit deleted file mode 100755 index c43d24d9..00000000 --- a/dh_installinit +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -w -# -# 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 $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; - if ($script=~m/(.*)d$/) { - $script=$1; - } - else { - warning("\"$PACKAGE\" has no final d' in its name, but -d was specified."); - } - } - elsif ($dh{INIT_SCRIPT}) { - $script=$dh{INIT_SCRIPT}; - } - else { - $script=$PACKAGE; - } - - $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"); - } - - 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}) { - # -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/"); - autoscript($PACKAGE,"postrm","postrm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - } - else { - 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/"); - } - } - } -} diff --git a/dh_installinit.1 b/dh_installinit.1 deleted file mode 100644 index cbb4b444..00000000 --- a/dh_installinit.1 +++ /dev/null @@ -1,62 +0,0 @@ -.TH DH_INSTALLINIT 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_installinit \- install init scripts into package build directories -.SH SYNOPSIS -.B dh_installinit -.I "[debhelper options] [--init-script=scriptname] [-n] [-r] [-d] [-uparams]" -.SH "DESCRIPTION" -dh_installinit is a debhelper program that is responsible for installing -init scripts into package build directories. -.P -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. -.P -If a file named debian/package.init (or debian/package.init.d for backwards -compatibility with debstd) exists, then it is installed into -etc/init.d/package in the package build directory, with "package" replaced -by the packagename. (You may use debian/init for the first binary package -listed in the control file.) -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.TP -.B \-n, \--noscripts -Do not modify postinst/postrm/prerm scripts. -.TP -.B \-r, \--no-restart-on-upgrade -Do not restart daemon on upgrade. -.TP -.B \-d, \--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/ . This may be useful -for daemons with names ending in "d". (Note: this takes precedence over -the --init-script parameter described below.) -.TP -.B \-uparams, \--update-rcd-params=params -Pass "params" to -.BR update-rc.d (8) -If not specified, "defaults" will be passed to -.BR update-rc.d (8) -.TP -.B \--init-script=scriptname -Use "scriptname" as for the filename the init script is installed as in -etc/init.d/ . 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 "scriptname" or "package.scriptname" and if so will install -it as the inist 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. -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.BR debhelper (1), -.BR update_rc.d (8) -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_movefiles.1 b/dh_movefiles.1 deleted file mode 100644 index 45b84a64..00000000 --- a/dh_movefiles.1 +++ /dev/null @@ -1,49 +0,0 @@ -.TH DH_MOVEFILES 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_movefiles \- move files out of debian/tmp into subpackages -.SH SYNOPSIS -.B dh_movefiles -.I "[debhelper options] [--sourcedir=dir] [file ..]" -.SH "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. -.P -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. You can -even use wildcards if you like. 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. -.P -The files will be moved in a special order: first all normal files, then all -symlinks. This is done because it tends to be a good thing to have symlinks -last in debian packages, particularly in shared library packages. -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.TP -.B --sourcedir=dir -Instead of moveing 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 `/'. -.TP -.B 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. You -can even use wildcards if you like. 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. -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.BR debhelper (1) -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_shlibdeps b/dh_shlibdeps deleted file mode 100755 index 69047dc0..00000000 --- a/dh_shlibdeps +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl -w -# -# Find dependancies. Simple dpkg-shlibdeps wrapper. - -BEGIN { push @INC, "debian", "/usr/share/debhelper" } -use Dh_Lib; -init(); - -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); - $EXT=pkgext($PACKAGE); - - my @filelist; - my $ff; - - # Generate a list of all ELF binaries in the package. - foreach $file (split(/\n/,`find $TMP -type f \\( -perm +111 -or -name "*.so*" \\)`)) { - # TODO: this is slow, optimize. Ie, file can run once on multiple files.. - $ff=`file $file`; - if ($ff=~m/ELF/) { - push @filelist,$file; - } - } - - if (@filelist) { - doit("dpkg-shlibdeps","-Tdebian/$EXT\substvars",@{$dh{U_PARAMS}},@filelist); - } -} diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1 deleted file mode 100644 index b414965f..00000000 --- a/dh_shlibdeps.1 +++ /dev/null @@ -1,37 +0,0 @@ -.TH DH_SHLIBDEPS 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_shlibdeps \- calculate shared library dependancies -.SH SYNOPSIS -.B dh_shlibdeps -.I "[debhelper options] [-uparams]" -.SH "DESCRIPTION" -dh_shlibdeps is a debhelper program that is responsible for calculating -shared library dependancies for all executables found in the package build -directory. -.P -This program is merely a wrapper around -.BR dpkg-shlibdeps (1) -that calls it once for each package listed in the control file. -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.TP -.B \-uparams, \--dpkg-shlibdeps-params=params -Pass "params" to -.BR dpkg-shlibdeps (1) -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.TP -.BR debhelper (1) -.TP -.BR dpkg-shlibdeps (1) -.SH "CONFORMS TO" -Debian policy, version 2.5.0.0 -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_testversion.1 b/dh_testversion.1 deleted file mode 100644 index 19ded263..00000000 --- a/dh_testversion.1 +++ /dev/null @@ -1,51 +0,0 @@ -.TH DH_TESTVERSION 1 "" "Debhelper Commands" "Debhelper Commands" -.SH NAME -dh_testversion \- ensure that the correct version of debhelper is installed -.SH SYNOPSIS -.B dh_testversion [debhelper options] [operator] [version] -.SH "DESCRIPTION" -dh_testversion compares the version of debhelper against the version you -specify, and if the condition is not met, exits with an error message. -.P -You should 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. -.P -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. -.SH OPTIONS -.TP -.B debhelper options -See -.BR debhelper (1) -for a list of options common to all debhelper commands. -.TP -.B operator -Optional comparison operator used in comparing the versions. If not -specified, ">=" is used. For descriptions of the comparison operators, see -dpkg --help. -.TP -.B version -Version number to compare against the current version of debhelper. If not -specified, dh_testversion does nothing. -.SH EXAMPLES -.TP -.I dh_testversion 1.0 -Make sure debhelper version 1.0 or higher is installed. -.TP -.I dh_testversion ge 1.0 -Another way to make sure debhelper version 1.0 or higher is installed. -.TP -.I dh_testversion lt 1.0 -Make sure a version of debhelper less than version 1.0 is installed. -.SH ENVIRONMENT -See -.BR debhelper (1) -for a list of environment variables that affect all debhelper commands. -.SH "SEE ALSO" -.BR debhelper (1) -.SH AUTHOR -Joey Hess <joeyh@master.debian.org> diff --git a/dh_testversion.in b/dh_testversion.in deleted file mode 100644 index 9e2f14ef..00000000 --- a/dh_testversion.in +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -e -# -# Debhelper version check. - -# Current version of debhelper is: -DH_VERSION=#DEBHELPER_VERSION# - -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib - -if [ "$1" -a "$2" ]; then - compare=$1 - ver=$2 -elif [ "$1" ]; then - compare=">=" - ver=$1 -fi - -if [ "$compare" -a "$ver" ] ; then - if ! dpkg --compare-versions $DH_VERSION $compare $ver; then - error "debhelper version $DH_VERSION is installed, but a version $compare $ver is needed to build this package." - fi -fi diff --git a/examples/rules.indep b/examples/rules.indep deleted file mode 100755 index e8a2b5d5..00000000 --- a/examples/rules.indep +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# This version is for packages that are architecture independent. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=1 - -build: build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - #$(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Add here commands to clean up after the build process. - #-$(MAKE) clean - #-$(MAKE) distclean - - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp. - #$(MAKE) prefix=`pwd`/debian/tmp/usr install - - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# dh_testversion - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit - dh_installcron -# dh_installmanpages - dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_link - dh_compress - dh_fixperms - # You may want to make some executables suid here. - dh_suidregister - dh_installdeb -# dh_perl - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture-dependent files here. -binary-arch: build install -# We have nothing to do by default. - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install |