From 93a4b4298d7ec022216f403674583dd04b7f4f5e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:24:34 +0000 Subject: [PATCH] r8: Initial Import --- TODO | 2 +- debian/changelog | 7 +++++++ dh_fixperms.1 | 2 +- dh_installcron | 20 ++++++++++++++++++++ dh_installcron.1 | 44 ++++++++++++++++++++++++++++++++++++++++++++ dh_installdebfiles | 2 +- dh_installdebfiles.1 | 2 +- dh_installmanpages.1 | 2 +- dh_installmenu.1 | 2 +- dh_strip | 30 ++++++++++++++++++++++++++++++ dh_testdir.1 | 2 +- dh_testroot.1 | 2 +- examples/rules | 1 + examples/rules.multi | 1 + 14 files changed, 111 insertions(+), 8 deletions(-) create mode 100755 dh_installcron create mode 100644 dh_installcron.1 create mode 100755 dh_strip diff --git a/TODO b/TODO index 078a1d4..8bf234f 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ .so files of compressed manpages change to symlinks -edit package scripts (??) add all other functionality of debstd (??) dh_fixperms: allow listing of files not to be touched (diffucult). +add suidregister support diff --git a/debian/changelog b/debian/changelog index f904102..27594de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.4) unstable; urgency=low + + * Added dh_strip to strip binaries and libraries. + * Fixed several man pages. + + -- Joey Hess Sun, 28 Sep 1997 20:46:32 -0400 + debhelper (0.3) unstable; urgency=low * Added support for automatic generation of debian install scripts to diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 6722bd1..b5cb4e1 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_FIXPERMS 1 .SH NAME dh_fixperms \- fix permissions of files in package build directories .SH SYNOPSIS diff --git a/dh_installcron b/dh_installcron new file mode 100755 index 0000000..7db8cdc --- /dev/null +++ b/dh_installcron @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# Install cron scripts into the appropriate places. + +PATH=debian:$PATH:/usr/lib/debhelper +source dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + for type in daily weekly monthly; do + if [ -e debian/${EXT}cron.$type ]; then + if [ ! -d debian/$TMP/etc/cron.$type ]; then + doit "install -o root -g root -d debian/$TMP/etc/cron.$type" + fi + doit "install debian/${EXT}cron.$type debian/$TMP/etc/cron.$type/$PACKAGE" + fi + done +done diff --git a/dh_installcron.1 b/dh_installcron.1 new file mode 100644 index 0000000..2819958 --- /dev/null +++ b/dh_installcron.1 @@ -0,0 +1,44 @@ +.TH DH_INSTALLCRON 1 +.SH NAME +dh_installcron \- install cron scripts into etc/cron.* +.SH SYNOPSIS +.B dh_installcron +.I "[-v] [-a] [-i] [-ppackage]" +.SH "DESCRIPTION" +dh_installcron is a debhelper program that is responsible for installing +cron scripts into etc/cron.* in package build directories. The files +debian/cron.daily, debian/cron.weekly, and debian/cron.monthly are +installed. If your package generates multiple binary packages, you can also +use filenames like debian/package.cron.daily, where "package" is replaced +with the name of the binary package this cron script goes into. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install cron files for all architecture dependent packages. +.TP +.B \-i +Install cron files for all architecture independent packages. +.TP +.B \-ppackage +Install cron files for the package named "package". +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH "CONFORMS TO" +Debian policy, version 2.3.0.0 +.SH AUTHOR +Joey Hess diff --git a/dh_installdebfiles b/dh_installdebfiles index a09cd12..37c6308 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -50,7 +50,7 @@ for PACKAGE in $DH_DOPACKAGES; do # Run dpkg-shlibdeps to generate dependancies. filelist="" - for file in `find debian/$TMP -type f \( -perm +111 \) -or -name "*.so.*" | tr "\n" " "` ; do + for file in `find debian/$TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do case "`file $file`" in *ELF*) filelist="$file $filelist" diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 3f63986..3a7e93c 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_INSTALLDEBFILES 1 .SH NAME dh_installdebfiles \- install files into the DEBIAN directory .SH SYNOPSIS diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 5fbad2b..bb08181 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_INSTALLMANPAGES 1 .SH NAME dh_installmanpages \- install man pages into package build directories .SH SYNOPSIS diff --git a/dh_installmenu.1 b/dh_installmenu.1 index f3eba62..e26c84e 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_INSTALLMENU 1 .SH NAME dh_installmenu \- install debian menu files into package build directories .SH SYNOPSIS diff --git a/dh_strip b/dh_strip new file mode 100755 index 0000000..2ecdcd2 --- /dev/null +++ b/dh_strip @@ -0,0 +1,30 @@ +#!/bin/sh -e +# +# Strip files. + +PATH=debian:$PATH:/usr/lib/debhelper +source dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + # Handle executables and shared libraries. + for file in `find debian/$TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do + case "`file $file`" in + *ELF*shared*) + doit "strip --strip-unneeded $file" + ;; + *ELF*executable*) + doit "strip --remove-section=comment --remove-section=note $file" + ;; + esac + done + + # Handle static libraries. + for file in `find debian/$TMP -type f -name "lib*.a" 2>/dev/null` ; do + # Don't strip debug libraries. + if ! expr "$file" : ".*_g\.a" >/dev/null ; then + doit "strip --strip-debug $file" + fi + done +done diff --git a/dh_testdir.1 b/dh_testdir.1 index 569a580..da24554 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_TESTDIR 1 .SH NAME dh_testdir \- test directory before building debian package .SH SYNOPSIS diff --git a/dh_testroot.1 b/dh_testroot.1 index f4dca2e..78caa7e 100644 --- a/dh_testroot.1 +++ b/dh_testroot.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_TESTROOT 1 .SH NAME dh_testroot \- ensure that a package is built as root .SH SYNOPSIS diff --git a/examples/rules b/examples/rules index b18213c..efd4b76 100755 --- a/examples/rules +++ b/examples/rules @@ -35,6 +35,7 @@ binary-arch: build dh_installmenu dh_installmanpages dh_installchangelogs + dh_strip dh_compress dh_installdebfiles dh_fixperms diff --git a/examples/rules.multi b/examples/rules.multi index 118737c..b31578e 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -51,6 +51,7 @@ binary-arch: build dh_installmenu -a dh_installmanpages -a dh_installchangelogs -a + dh_strip -a dh_compress -a dh_installdebfiles -a dh_fixperms -a -- 2.39.5