summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh_installcron20
-rw-r--r--dh_installcron.144
-rwxr-xr-xdh_strip30
3 files changed, 94 insertions, 0 deletions
diff --git a/dh_installcron b/dh_installcron
new file mode 100755
index 00000000..7db8cdc6
--- /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 00000000..2819958b
--- /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 <joeyh@master.debian.org>
diff --git a/dh_strip b/dh_strip
new file mode 100755
index 00000000..2ecdcd2c
--- /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