]> git.donarmstrong.com Git - debhelper.git/commitdiff
r3: Initial revision
authorjoey <joey>
Tue, 17 Aug 1999 04:20:25 +0000 (04:20 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:20:25 +0000 (04:20 +0000)
20 files changed:
README [new file with mode: 0644]
autoscripts/postinst-menu [new file with mode: 0644]
autoscripts/postinst-menu-method [new file with mode: 0644]
autoscripts/postrm-menu-method [new file with mode: 0644]
debian/debhelper2.substvars [new file with mode: 0644]
debian/debhelperfoo.substvars [new file with mode: 0644]
dh_builddeb.1 [new file with mode: 0644]
dh_clean.1 [new file with mode: 0644]
dh_compress.1 [new file with mode: 0644]
dh_fixperms.1 [new file with mode: 0644]
dh_installchangelogs.1 [new file with mode: 0644]
dh_installdebfiles.1 [new file with mode: 0644]
dh_installdocs.1 [new file with mode: 0644]
dh_installexamples.1 [new file with mode: 0644]
dh_installmanpages.1 [new file with mode: 0644]
dh_installmenu.1 [new file with mode: 0644]
dh_strip.1 [new file with mode: 0644]
dh_testdir.1 [new file with mode: 0644]
dh_testroot.1 [new file with mode: 0644]
examples/rules.multi [new file with mode: 0755]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..8fbaebe
--- /dev/null
+++ b/README
@@ -0,0 +1,34 @@
+Debhelper is a collection of programs that can be used in debian/rules files
+to automate common tasks. For further documentation, see the man pages for
+dh_* commands.
+
+To help you get started, I've included an example of a debian/rules file
+that uses debhelper commands extensivly. See
+/usr/doc/debhelper/examples/rules .
+
+Notes on multiple binary packages:
+---------------------------------
+
+If your source package generates more than one binary package, debhelper
+programs will default to acting on all binary packages when run. If your
+source package happens to generate one architecture dependent package, and
+another architecture independent package, this is not the correct behavior,
+because you need to generate the architecture dependent packages in the
+binary-arch debian/rules target, and the architecture independent packages
+in the binary-indep debian/rules target.
+
+To faciliatate this, as well as give you more control over which packages
+are acted on by debhelper programs, all debhelper programs accept the
+following parameters:
+
+-a             Act on architecture dependent packages
+-i             Act on architecture independent packages
+-ppackage      Act on the package named "package" (may be repeated multiple
+               times)
+
+These parameters are cumulative. If none are given, the tools default to
+effecting all packages.
+
+See examples/rules.multi for an example of how to use this.
+
+-- Joey Hess <joeyh@master.debian.org>
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu
new file mode 100644 (file)
index 0000000..a73a169
--- /dev/null
@@ -0,0 +1 @@
+if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method
new file mode 100644 (file)
index 0000000..0ea7959
--- /dev/null
@@ -0,0 +1,5 @@
+inst=/etc/menu-methods/#PACKAGE#
+if [ -x /usr/bin/update-menus -a -f $inst -a -x /usr/sbin/install-menu ] ; then
+       chmod a+x $inst
+       update-menus
+fi
diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method
new file mode 100644 (file)
index 0000000..3e63f2f
--- /dev/null
@@ -0,0 +1,3 @@
+inst=/etc/menu-methods/#PACKAGE#
+if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi
+if [ -x /usr/bin/update-menus ] ; then update-menus; fi
diff --git a/debian/debhelper2.substvars b/debian/debhelper2.substvars
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/debhelperfoo.substvars b/debian/debhelperfoo.substvars
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/dh_builddeb.1 b/dh_builddeb.1
new file mode 100644 (file)
index 0000000..bfe72e7
--- /dev/null
@@ -0,0 +1,39 @@
+.TH DH_BUILDDEB 1
+.SH NAME
+dh_builddeb \- build debian packages
+.SH SYNOPSIS
+.B dh_builddeb
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_builddeb simply calls
+.BR dpkg (8)
+to build a .deb package or packages.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory, etc.
+.TP
+.B \-a
+Build all architecture dependent packages.
+.TP
+.B \-i
+Build all architecture independent packages.
+.TP
+.B \-ppackage
+Build 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 built.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_clean.1 b/dh_clean.1
new file mode 100644 (file)
index 0000000..e387c4e
--- /dev/null
@@ -0,0 +1,46 @@
+.TH DH_CLEAN 1
+.SH NAME
+dh_clean \- clean up package build directories
+.SH SYNOPSIS
+.B dh_clean
+.I "[-v] [-a] [-i] [-ppackage] [file ...]"
+.SH "DESCRIPTION"
+dh_clean is a debhelper program that is responsible for cleaning up after a
+package is built. It removes the package build directories, and removes some
+other files, such as debian/substvars, debian/files, DEADJOE, emacs backup 
+files, etc.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Clean up the package build directory for all architecture dependent packages.
+.TP
+.B \-i
+Clean up the package build directory for all architecture independent packages.
+.TP
+.B \-ppackage
+Clean up the package build directory for the package named "package".
+.TP
+.B file ...
+Delete these files too.
+.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 have thier package build directories cleaned up.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH BUGS
+Filenames with spaces in them will not currently be deleted when specified
+as parameters.
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_compress.1 b/dh_compress.1
new file mode 100644 (file)
index 0000000..06087b8
--- /dev/null
@@ -0,0 +1,68 @@
+.TH DH_COMPRESS 1
+.SH NAME
+dh_compress \- compress files and fix symlinks in package build directories
+.SH SYNOPSIS
+.B dh_compress
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_compress is a debhelper program that is responsible for compressing
+the files in package build directories, and makes sure that any symlinks
+that pointed to the files before they were compressed are updated to point
+to the new files.
+.P
+By default, dh_compress compresses files that debian policy mandates should
+be compressed, namely all files in usr/info, usr/man, usr/X11R6/man, and
+all files in usr/doc that are larger than 4k in size, except
+the copyright file, .html files and .gif files.
+.P
+If a debian/compress file exits, however, it will be ran as a shell script,
+and all filenames that the shell script outputs will be compressed instead
+of the default files. Note that the shell script will be run from inside the
+package build directory.
+.SH EXAMPLE
+Here is a sample debian/compress file that causes dh_compress to compress
+the same files as it would by default. This is a good starting point for
+customization of what files are compressed:
+.PP
+ find usr/info usr/man usr/X11*/man -type f
+ find usr/doc -type f -size +4k \\
+       ! -name "*.htm*" ! -name "*.gif" \\
+       ! -name "copyright"
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Compress files for all architecture dependent packages.
+.TP
+.B \-i
+Compress files for all architecture independent packages.
+.TP
+.B \-ppackage
+Compress 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 have their files compressed.
+.P
+The debian/compress file applies to the first binary package listed in your
+control file. For the other packages, you can make files named
+debian/package.compress, where "package" is the name of the package they 
+apply to.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH BUGS
+Filenames with spaces in them may not properly be compressed.
+.SH "CONFORMS TO"
+Debian policy, version 2.3.0.0
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_fixperms.1 b/dh_fixperms.1
new file mode 100644 (file)
index 0000000..6722bd1
--- /dev/null
@@ -0,0 +1,45 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_fixperms \- fix permissions of files in package build directories
+.SH SYNOPSIS
+.B dh_fixperms
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_fixperms is a debhelper program that is responsible for setting the
+permissions of files in package build directories to a sane state.
+.P
+dh_fixperms makes all files in usr/doc in the package build directory be 
+mode 644. It also changes the permissions of all man pages to mode 644.
+It makes all files be owned by root, and it removes group and other write
+permission from all files.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Fix permissions for all architecture dependent packages.
+.TP
+.B \-i
+Fix permissions for all architecture independent packages.
+.TP
+.B \-ppackage
+Fix permissions 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 have thier permissions fixed.
+.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_installchangelogs.1 b/dh_installchangelogs.1
new file mode 100644 (file)
index 0000000..2371af1
--- /dev/null
@@ -0,0 +1,52 @@
+.TH DH_INSTALLCHANGELOGS 1
+.SH NAME
+dh_installchangelogs \- install changelogs into package build directories
+.SH SYNOPSIS
+.B dh_installchangelogs
+.I "[-v] [-a] [-i] [-ppackage] upstream"
+.SH "DESCRIPTION"
+dh_installchangelogs is a debhelper program that is responsible for installing
+changelogs into package build directories.
+.P
+dh_installchangelogs determines if the package is a debian native package,
+and if so, it installs debian/changelog into usr/doc/package/changelog in
+the package build directory. Otherwise, it installs debian/changelog into
+usr/doc/package/changelog.Debian in the package build directory.
+.P
+If an upstream changelog file is specified as an option, and the package is
+not a native debian package, then this upstream changelog will be installed
+as usr/doc/package/changelog in the package build directory.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install changelogs for all architecture dependent packages.
+.TP
+.B \-i
+Install changelogs for all architecture independent packages.
+.TP
+.B \-ppackage
+Install changelogs 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 have the changelogs installed into them.
+.P
+It is an error to specify an upstream changelog file for a debian native
+package.
+.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_installdebfiles.1 b/dh_installdebfiles.1
new file mode 100644 (file)
index 0000000..1f62084
--- /dev/null
@@ -0,0 +1,59 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_installdebfiles \- install files into the DEBIAN directory
+.SH SYNOPSIS
+.B dh_installdebfils
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_installdebfiles is a debhelper program that is responsible for installing
+files into the DEBIAN directory in package build directories with the
+correct prmissions.
+.P
+dh_installdocs automatically installs the following files from debian/ into
+the DEBIAN directory:
+.IP postinst
+.IP preinst
+.IP postrm
+.IP prerm
+.IP shlibs
+.IP conffiles
+.P
+(For packages other than the first binary package listed in debian/control,
+prefix these filenames with then name of the "package.", for example, 
+"foo.postinst".)
+.P
+In addition, it will generate a DEBIAN/control file, by running
+.BR dpkg-shlibdeps (1)
+and
+.BR dpkg-gencontrol (1)
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install files for all architecture dependent packages.
+.TP
+.B \-i
+Install files for all architecture independent packages.
+.TP
+.B \-ppackage
+Install 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_installdocs.1 b/dh_installdocs.1
new file mode 100644 (file)
index 0000000..f21563c
--- /dev/null
@@ -0,0 +1,59 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_installdocs \- install documentation into package build directories
+.SH SYNOPSIS
+.B dh_installdocs
+.I "[-v] [-a] [-i] [-ppackage] [file ...]"
+.SH "DESCRIPTION"
+dh_installdocs is a debhelper program that is responsible for installing
+documentation into usr/doc/package in package build directories.
+.P
+dh_installdocs automatically installs debian/copyright if it exists. If
+dh_installdocs is acting on multiple packages, debian/copyright files will be 
+installed into all packages.
+.P
+Any filenames specified as parameters, as well as debian/README.debian and
+debian/TODO, if they exist, will be installed into the first binary
+package listed in debian/control, if dh_installdocs is acting on that
+package.
+.P
+A file named debian/docs (for the first binary package in debian/control),
+or debian/package.docs (for each additional package in debian/control) can
+list other files to be installed.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install files for all architecture dependent packages.
+.TP
+.B \-i
+Install files for all architecture independent packages.
+.TP
+.B \-ppackage
+Install files for the package named "package".
+.TP
+.B file ...
+Install these files as documentation into the first binary package listed in
+debian/control, if we are acting on that 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 BUGS
+Filenames with spaces in them will not currently be installed.
+.SH "CONFORMS TO"
+Debian policy, version 2.3.0.0
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installexamples.1 b/dh_installexamples.1
new file mode 100644 (file)
index 0000000..1fb5c44
--- /dev/null
@@ -0,0 +1,54 @@
+.TH DH_INSTALLEXAMPLES 1
+.SH NAME
+dh_installexamples \- install example files into package build directories
+.SH SYNOPSIS
+.B dh_installexamples
+.I "[-v] [-a] [-i] [-ppackage] [file ...]"
+.SH "DESCRIPTION"
+dh_installexamples is a debhelper program that is responsible for installing
+examples into usr/doc/package/examples in package build directories.
+.P
+Any filenames specified as parameters will be installed into the first
+binary package listed in debian/control, if dh_installexamples is acting on
+that package.
+.P
+A file named debian/examples (for the first binary package in debian/control),
+or debian/package.exmaples (for each additional package in debian/control) can
+list other files to be installed.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install files for all architecture dependent packages.
+.TP
+.B \-i
+Install files for all architecture independent packages.
+.TP
+.B \-ppackage
+Install files for the package named "package".
+.TP
+.B file ...
+Install these files as documentation into the first binary package listed in
+debian/control, if we are acting on that 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 BUGS
+Filenames with spaces in them will not currently be installed.
+.SH "CONFORMS TO"
+Debian policy, version 2.3.0.0
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installmanpages.1 b/dh_installmanpages.1
new file mode 100644 (file)
index 0000000..5fbad2b
--- /dev/null
@@ -0,0 +1,67 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_installmanpages \- install man pages into package build directories
+.SH SYNOPSIS
+.B dh_installmanpages
+.I "[-v] [-a] [-i] [-ppackage] [file ...]"
+.SH "DESCRIPTION"
+dh_installmanpages is a debhelper program that is responsible for
+automatically installing man pages into usr/man/ and usr/X11R6/man/ in
+package build directories.
+.P
+dh_installmanpages scans the current directory and all subdirectories for
+filenames that look like man pages. It uses
+.BR file (1)
+to verify that the files are in the correct format. Then, based on the
+files' extentions, it installs them into the correct man directory.
+.P
+All filenames specified as parameters will be skipped by dh_installmanpages.
+This is useful if by default it installs some man pages that you do not want
+to be installed.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install man pages into all architecture dependent packages.
+.TP
+.B \-i
+Install man pages into all architecture independent packages.
+.TP
+.B \-ppackage
+Install man pages into the package named "package".
+.TP
+.B file ...
+Do not install these files as man pages, even if they look like valid man
+pages.
+.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.
+.P
+dh_installmanpages will install the man pages it finds into
+.B all
+packages you tell it to act on, since it can't tell what package the man
+pages belong in.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH BUGS
+Man pages with the extention
+.B .man
+are not automatically installed. 
+.P
+Files specified as parameters that contain spaces in their filenames will
+not be processed properly.
+.P
+This is a "Do what I Mean" type program - you have been warned!
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installmenu.1 b/dh_installmenu.1
new file mode 100644 (file)
index 0000000..c7fa1bf
--- /dev/null
@@ -0,0 +1,52 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_installmenu \- install debian menu files into package build directories
+.SH SYNOPSIS
+.B dh_installmenu
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_installmenu is a debhelper program that is responsible for installing
+fils used by the debian menu package into package build directories.
+.P
+If a file named debian/menu exists, then it is installed into
+usr/lib/menu/package in the package build directory. This is a debian menu
+file.
+.P
+If a file named debian/menu-method exits, then it is installed into
+etc/menu-methods/package in the package build directory. This is a debian
+menu method file.
+.P
+For packages other than the first binary package listed in
+the control file, use debian/package.menu and debian/package.menu-method 
+instead (replace "package" with the name of the package.)
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Install menu files into all architecture dependent packages.
+.TP
+.B \-i
+Install menu files into all architecture independent packages.
+.TP
+.B \-ppackage
+Install menu files into 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
+,
+.BR menufile (1)
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_strip.1 b/dh_strip.1
new file mode 100644 (file)
index 0000000..2eba991
--- /dev/null
@@ -0,0 +1,45 @@
+.TH DH_STRIP 1
+.SH NAME
+dh_strip \- strip executables, shared libraries, and some static libraries.
+.SH SYNOPSIS
+.B dh_strip
+.I "[-v] [-a] [-i] [-ppackage]"
+.SH "DESCRIPTION"
+dh_strip is a debhelper program that is responsible for stripping
+executables, shared libraries, and static libraries that are not used for
+debugging.
+.P
+It assumes that files that have names like lib*_g.a are static libraries
+used in debugging, and will not strip them.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+.TP
+.B \-a
+Strip files in all architecture dependent packages.
+.TP
+.B \-i
+Strip files in all architecture independent packages (likely, this is
+pointless :-).
+.TP
+.B \-ppackage
+Strip 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 have their files stripped.
+.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_testdir.1 b/dh_testdir.1
new file mode 100644 (file)
index 0000000..569a580
--- /dev/null
@@ -0,0 +1,29 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_testdir \- test directory before building debian package
+.SH SYNOPSIS
+.B dh_testdir
+.I "[-v] [file ...]"
+.SH "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.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+This currently has no effect.
+.TP
+.B file ...
+Test for the existance of these files.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH BUGS
+Files with spaces in their names will not be processed correctly.
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/dh_testroot.1 b/dh_testroot.1
new file mode 100644 (file)
index 0000000..f4dca2e
--- /dev/null
@@ -0,0 +1,24 @@
+.TH DH_INSTALLDOCS 1
+.SH NAME
+dh_testroot \- ensure that a package is built as root
+.SH SYNOPSIS
+.B dh_testroot
+.I "[-v]"
+.SH "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
+.BR fakeroot (1)
+to work around this.
+.SH OPTIONS
+.TP
+.B \-v
+Verbose mode; show all commands that modify the package build directory.
+This currently has no effect.
+.SH ENVIRONMENT
+.TP
+.I DH_VERBOSE
+Enables verbose mode.
+.SH "SEE ALSO"
+.BR /usr/doc/debhelper/README
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/examples/rules.multi b/examples/rules.multi
new file mode 100755 (executable)
index 0000000..118737c
--- /dev/null
@@ -0,0 +1,60 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independant
+# package.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+       # Add here commands to compile the pacckage.
+       #$(MAKE)
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+       dh_clean
+       # Add here commands to clean up after the build process.
+       #-$(MAKE) distclean
+
+# Build architecture-independent files here.
+binary-indep: build
+       dh_testdir -i
+       dh_testroot -i
+       dh_clean -i
+        # Add here commands to install the files into debian/tmp
+        #$(MAKE) PREFIX=debian/tmp install
+       dh_installdocs -i
+       dh_installexamples -i
+       dh_installmenu -i
+#      dh_installmanpages -i
+       dh_installchangelogs -i
+       dh_compress -i
+       dh_installdebfiles -i
+       dh_fixperms -i
+       dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build
+       dh_testdir -a
+       dh_testroot -a
+       dh_clean -a
+       # Add here commands to install the files into debian/tmp
+       #$(MAKE) PREFIX=debian/tmp install
+       dh_installdocs -a
+       dh_installexamples -a
+       dh_installmenu -a
+       dh_installmanpages -a
+       dh_installchangelogs -a
+       dh_compress -a
+       dh_installdebfiles -a
+       dh_fixperms -a
+       dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary