one good order you can run the different debhelper scripts in (though other
variations are possible).
+
+Converting from debstd to debhelper:
+-----------------------------------
+
+Debhelper is designed to be mostly backwards compatable to debstd. I say
+mostly becuase I haven't made debhelper handle everything that debstd does
+yet, and in a few cases, it does things differently (and I hope, better).
+
+In general, you can switch over to using debhelper as follows. In your
+debian/rules, where you used to have some lines that read something like:
+
+ debstd CHANGES TODO README
+ dpkg-gencontrol
+ dpkg --build debian/tmp ..
+
+Remove that and replace it with something like:
+
+ dh_installdocs TODO README
+ dh_installexamples
+ dh_installmenu
+ dh_installcron
+ dh_installmanpages
+ dh_installchangelogs CHANGES
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_suidregister
+ dh_installdebfiles
+ dh_m5dsums
+ dh_builddeb
+
+Notice that the parameters sent to debstd get split up among the dh_*
+programs. The upstream changelog is passed to dh_installchangelogs, and the
+docs are passed to dh_installdocs.
+
+Debstd has many switches, that turn off differnt parts of it. So if you
+were using debstd -m to tell it not to automatically install manpages,
+for example, you can just comment out the dh_installmanpages line.
+
+Finally, debstd automatically modified postinst, postrm, etc scripts. Some
+of the dehelper apps do that too, but they do it differnently. Debstd just
+appends its commands to the end of the script. Debhelper reqyires that you
+insert a tag into your scripts, that will tell debhelper where to insert
+commands. So if you have postinst, postrm, etc scripts, add a line reading
+"#DEBHELPER" to the end of them.
+
+Once you think it's all set up properly, do a test build of your package. If
+it works ok, I reccommend that you compare the new package and the old
+debstd-generated package very closely. Pay special attention to the postint,
+postrm, etc scripts.
+
+
Automatic generation of debian install scripts:
----------------------------------------------
Note that it will be shell code, so you cannot directly use it in a perl
script.
+
Notes on multiple binary packages:
---------------------------------
+debhelper (0.11) unstable; urgency=low
+
+ * dh_md5sums: behavior modification: do not generate md5sums for conffiles.
+ (Thanks to Charles Briscoe-Smith <cpb4@ukc.ac.uk>) #14048.
+ * dh_md5sums: can generate conffile md5sums with -x parameter.
+ * Added a "converting from debstd" section to the README.
+ * Added dh_du, generates a DEBIAN/du file with disk usage stats (#14048).
+
+ -- Joey Hess <joeyh@master.debian.org> Tue, 21 Oct 1997 13:17:28 -0400
+
debhelper (0.10) unstable; urgency=medium
* dh_installdebfiles: fixed *bad* bug that messed up the names of all
Debhelper is written by Joey Hess <joeyh@master.debian.org>.
-Parts of the code came from debmake, by Christoph Lameter
-<clameter@debian.org>.
-The copyright of this package is GPL.
+Parts of the code (and certianly my inspiration from the whole thing) came
+from debmake, by Christoph Lameter <clameter@debian.org>.
+
+Some of the dh_md5sums and dh_du commands is from a program by Charles
+Briscoe-Smith <cpb4@ukc.ac.uk>.
+
+The copyright of this package is GPL, version 2 or later.
./dh_fixperms
./dh_suidregister
./dh_installdebfiles
+ ./dh_du
./dh_md5sums
./dh_builddeb
# Argument processing and global variable initialization is below.
# Parse command line.
-set -- `getopt vianp: $*`
+set -- `getopt xvianp: $*`
for i; do
case "$i"
DH_NOSCRIPTS=1
shift
;;
+ -x)
+ DH_EXCLUDE=1
+ shift
+ ;;
--)
shift
break
doit "install -d debian/$TMP/DEBIAN"
fi
- doit "cd debian/$TMP"
# Doit isn't smart enough to hande this next command so echo by hand. (sigh)
- verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums </dev/null'
- md5sum `find * -type f ! -regex "^DEBIAN/.*"` >DEBIAN/md5sums </dev/null
- doit "chown root.root DEBIAN/md5sums"
- doit "cd ../.."
+ verbose_echo 'find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP/:: | sort > debian/$TMP/DEBIAN/allfiles'
+ find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP:: | sort > debian/$TMP/DEBIAN/allfiles
+ # Check if we should exclude conffiles.
+ if [ ! "$DH_EXCLUDE" -a -r debian/$TMP/DEBIAN/conffiles ]; then
+ verbose_echo "sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new"
+ sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new
+ doit "mv debian/$TMP/DEBIAN/allfiles.new debian/$TMP/DEBIAN/allfiles"
+ fi
+ verbose_echo "cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.."
+ cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../..
+ doit "chown root.root debian/$TMP/DEBIAN/md5sums"
+ doit "rm -f debian/$TMP/DEBIAN/allfiles"
done
dh_md5sums \- generate DEBIAN/md5sums file
.SH SYNOPSIS
.B dh_md5sums
-.I "[-v] [-a] [-i] [-ppackage]"
+.I "[-x] [-v] [-a] [-i] [-ppackage]"
.SH "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.
.P
-All files in DEBIAN/ are omitted from the md5sums file.
+All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles
+(unless you use the -x switch).
.P
The md5sums file is installed with proper permissions and ownerships.
.SH OPTIONS
.TP
.B \-ppackage
Generate md5sums file for the package named "package".
+.TP
+.B \-x
+Include conffiles in the md5sums list. Note that this is redundant, and
+included elsewhere in debian packages.
.SH NOTES
The
.B \-a
.TP
.I DH_VERBOSE
Enables verbose mode
-.SH BUGS
-It would be better if it did not include md5sums of conffiles, since this
-info is duplicated elsewhere.
.SH "SEE ALSO"
.BR /usr/doc/debhelper/README
.SH AUTHOR
dh_fixperms
dh_suidregister
dh_installdebfiles
+ dh_du
dh_m5dsums
dh_builddeb
dh_fixperms -i
dh_suidregister -i
dh_installdebfiles -i
+ dh_du -a
dh_md5sums -i
dh_builddeb -i
dh_fixperms -a
dh_suidregister -a
dh_installdebfiles -a
+ dh_du -a
dh_md5sums -a
dh_builddeb -a