dh_make [-bnlsmiadh] [-c license] [-e address] [-f file] [-t directory]
[-o directory] [-p name] [--copyright license] [--email address]
[--native] [--file file] [--library] [--single] [--indep] [--multi]
[--kmod] [--kpatch] [--addmissing] [--templates directory] [--default-
less] [--overlay directory] [--packagename name] [--dpatch] [--quilt]
dh_make is a tool to convert a regular source code package into one
formatted according to the requirements of the Debian Policy. dh_make
must be invoked within a directory containing the source code, which
must be named <packagename>-<version>. The <packagename> must be all
lowercase, digits and dashes. If the directory name does not conform to
this scheme, you must rename it before using dh_make. Alternatively,
you may be able to use the --packagename option to force the package
Single binary (s)
The package will generate a single binary .deb package. It is
the standard case, so if you don't know what to do, choose this.
The package will generate a single package that is arch-indpen-
Multiple binary (m)
The package will generate multiple binary .deb packages from one
source package. Choose this for larger packages that need to be
The package will generate at least two binaries. One library
package containing just the lib in /usr/lib and another
*-dev_*.deb package containing documentation and C headers.
Kernel module (k)
The package will generate a binary-all kernel module -source
package for use with the make-kpkg command. It also generates a
binary package for additional utilities, daemons, etc. that may
come with the source.
The package will be build using the Common Debian Build System.
CDBS provides a sane set of default rules upon which packages
The package will generate a package that can be used for kernel
files are customized with the packagename and version extracted from
the directory name. The username is looked up in the environment vari-
able $DEBFULLNAME if this exists. If not the environment variable
$LOGNAME is used to find a name in the /etc/passwd file, and through
NIS, YP and LDAP. The e-mail address is found in the environment and
If the environment variable $EMAIL or $DEBEMAIL is set, or the -e
(--email) option is supplied, then that e-mail address is used for the
e-mail address of the maintainer (instead of looking it up in the envi-
ronment. An example, for bash:
dh_make will also generate example files that are also customized for
the package generated. You can remove all files with *.ex if you wish.
You can also delete the README.Debian file if you don't have anything
to put in it. Renaming the example files to their name without the .ex
at the end (and editing them if necessary) will activate that feature
If the --templates or -o (--overlay) option is used dh_make will apply
a customizing template to the "debian" directory. See the templates
described in the FILES section of this manpage for samples.
-c, --copyright <license>
Use <license> type in copyright file. <license> can be gpl,
gpl2, gpl3, lgpl, lgpl2 lgpl3, artistic, apache or bsd. If this
field is not specified the copyright file has a space to fill in
which sort of license is used. The field is case-insensitive so
-c GPL works as well as -c gpl. gpl and lgpl will give you ver-
sion 3 of the corresponding license, apache implies Apache v2.0.
If you need a different version, change the license file after-
wards or use the gpl2 and lgpl2 options.
-e, --email <address>
Use <address> as the e-mail address in the Maintainer: field of
Create a native Debian packages, i.e. do not generate a .orig
archive, since it will be generated when building with dpkg-
buildpackage. The version number will not have a Debian revi-
sion number (e.g. -1) appended to it.
-f, --file <file>
Use <file> as the original source archive, and skip the copying
of the current program tree to program.orig.
Automatically set the package class to Library, skipping the
Automatically set the package class to Kernel module, skipping
Automatically set package class to cdbs, skipping the question.
Automatically set package class to kpatch, skipping the ques-
Adds missing example and control files on an existing debian
-t, --templates <directory>
Applies the customizing templates in <directory> to the debian
-o, --overlay <directory>
Applies a customization template to an existing debian direc-
-p, --packagename <name>
Force the package name to be <name>, good for packages with
hyphens in their name or other strangeness. You can also make
the parameter <name>_<version> which will set both the package
name and version and bypass and directory checking.
Skips applying the default templates to the target debian direc-
Display the name, version, available options and authors, and
The new package will use dpatch to manage patches.
The new package will use quilt to manage patches.
Show the program name and version, and exit successfully.
The following enviornment settings are used by dh_make:
Email address to use in control and changelog entries.
You full name, eg "John Doe" which will appear in the control
with files specific to the Single binary class,
with files specific to the Multiple binary class,
with files specific to the Library class, and finally,
with files specific to the native Debian packages.
template files for the more common licenses used in Debian pack-
To get dh_make to use the defaults and ask you various questions about
Create your single class package using the with the GPL license:
dh_make -s -c gpl
A more involved example where you set your name in the environment,
contact email and license in the options and specify the upstream file:
$ DEBFULLNAME="John Doe" \
dh_make --email email@example.com \
dpkg(1), dpkg-buildpackage(1), debhelper(1), make-kpkg(1), debhelper(7)
You may also want to read the Debian Policy (in
/usr/share/doc/debian-policy) and the New Maintainers' Guide (in
Christoph Lameter <firstname.lastname@example.org> wrote the original script, in
Craig Small <email@example.com> made many enhancements to the script,
and later rewrote it in perl.
Bruce Sass <firstname.lastname@example.org> added support for customization templates.
Debian Project 12 March 2009 DH_MAKE(8)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2013
All Rights Reserved.