41
42
The package will generate at least two binaries. One library package
42
containing just the lib in /usr/lib and another *\-dev_*.deb package
43
containing just the lib in \fI/usr/lib\fR and another *\-dev_*.deb package
43
44
containing documentation and C headers.
45
46
.B Kernel module (k)
46
47
The package will generate a binary\-all kernel module \-source package for
47
use with the make\-kpkg command. It also generates a binary package for
50
command. It also generates a binary package for
48
51
additional utilities, daemons, etc. that may come with the source.
51
The package will be build using the Common Debian Build System.
52
CDBS provides a sane set of default rules upon which packages can build.
55
54
The package will generate a package that can be used for kernel patches.
57
Unless \-\-native was given,
56
Unless \fB\-\-native\fR was given,
59
58
makes sure a original source archive (<packagename>_<version>.orig.tar.gz)
61
If no such file exists, the file specified with \-f is copied in place.
62
If no \-f is supplied either but \-\-createorig is, the current directory
63
it copied into <packagename>\-<version>.orig which will be made into this
64
archive by dpkg\-source later automatically.
59
exists. The archive can either end with .gz or one of the other supported
60
compression extensions such as bz2 or lzma.
61
If no such file exists, the file specified with \fB\-f\fR is copied in place.
62
If no \fB\-f\fR is supplied either but \fB\-\-createorig\fR is, the current
63
directory is created into a news archive
64
.I ../<packagename>\-<version>.orig.tar.gz
65
65
The original archive is needed for other Debian tools to generate the
66
66
diffs to the original sources required by the Debian packaging format.
67
67
Unless there are reasons against it, this file should be the pristine
72
72
proceeds to generate a "debian" subdirectory and the necessary control
73
73
files in the program source directory. Those control files are customized
74
with the packagename and version extracted from the directory name. The
75
username is looked up in the environment variable
77
if this exists. If not the environment variable
79
is used to find a name in the /etc/passwd file, and through NIS, YP and LDAP.
80
The e-mail address is found in the environment and /etc/mailname.
82
If the environment variable
74
with the packagename and version extracted from the directory name.
77
makes several attempts to obtain the username. It first checks for the
78
environment variables \fB$DEBFULLNAME\fR, \fB$LOGNAME\fR is used to
79
find a name in the \fI/etc/passwd\fR file, and through NIS, YP
82
The e-mail address can either be specified with the -fB\-\-email\fR option
86
is set, or the \-e (\-\-email) option is supplied, then that e\-mail address
87
is used for the e\-mail address of the maintainer (instead of looking it
88
up in the environment. An example, for bash:
90
export DEBEMAIL="jsmith@debian.org"
85
will attempt to find it. It will first check the environment variables
86
\fB$DEBEMAIL\fR and then \fB$EMAIL. If they are not set then
88
will search an available LDAP directory using
90
using \fB$LOGNAME\fR as the uid to search under. Finally it will use
91
\fB$LOGNAME\fR and \fI/etc/mailname\fR to generate an email address.
93
94
will also generate example files that are also customized for the package
94
95
generated. You can remove all files with *.ex if you wish. You can also
96
97
Renaming the example files to their name without the .ex at the end (and
97
98
editing them if necessary) will activate that feature of debhelper.
99
If the \-\-templates or \-o (\-\-overlay) option is used
100
If the \fB\-\-templates\fR or \fB\-o\fR (\fB\-\-overlay\fR) option is used
101
102
will apply a customizing template to the "debian" directory. See the
102
103
templates described in the FILES section of this manpage for samples.
105
.I \-c, \-\-copyright <license>
106
Use <license> type in copyright file. <license> can be gpl, gpl2, gpl3,
107
lgpl, lgpl2 lgpl3, artistic, apache
108
or bsd. If this field is not specified the copyright file has a space to
106
.BR \-c ", " \-\-copyright\ \fIlicense\fR
107
Use \fIlicense\fR type in copyright file. \fIlicense\fR can be gpl, gpl2,
108
gpl3, lgpl, lgpl2 lgpl3, artistic, apache, bsd or x11.
109
If this field is not specified the copyright file has a space to
109
110
fill in which sort of license is used. The field is case-insensitive so
110
111
\-c GPL works as well as \-c gpl. gpl and lgpl will give you version 3
111
112
of the corresponding license, apache implies Apache v2.0. If you need a
112
113
different version, change the
113
114
license file afterwards or use the gpl2 and lgpl2 options.
115
.I \-e, \-\-email <address>
116
Use <address> as the e\-mail address in the Maintainer: field of
116
.BR \-e ", " \-\-email\ \fIaddress\fR
117
Use \fIaddress\fR as the e\-mail address in the Maintainer: field of
117
118
debian/control file.
120
.BR \-n ", " \-\-native
120
121
Create a native Debian packages, i.e. do not generate a .orig archive,
121
122
since it will be generated when building with dpkg-buildpackage.
122
123
The version number will not have a Debian revision number (e.g. \-1)
125
.I \-f, \-\-file <file>
126
Use <file> as the original source archive, and skip the copying of the
126
.BR \-f ", " \-\-file\ \fIfile\fR
127
Use \fIfile\fR as the original source archive, and skip the copying of the
127
128
current program tree to program.orig.
130
.BR \-l ", " \-\-library
130
131
Automatically set the package class to Library, skipping the question.
133
.BR \-s ", " \-\-single
133
134
Automatically set the package class to Single binary, skipping the question.
136
.BR \-i ", " \-\-indep
136
137
Automatically set the package class to arch-independent binary, skipping the question.
139
.BR \-m ", " \-\-multi
139
140
Automatically set the package class to Multiple binary, skipping the question.
142
.BR \-k ", " \-\-kmod
142
143
Automatically set the package class to Kernel module, skipping the question.
145
Automatically set package class to cdbs, skipping the question.
148
146
Automatically set package class to kpatch, skipping the question.
150
.I \-a, \-\-addmissing
148
.BR \-a ", " \-\-addmissing
151
149
Adds missing example and control files on an existing debian source directory.
153
.I \-t, \-\-templates <directory>
154
Applies the customizing templates in <directory> to the debian directory.
151
.BR \-t ", " \-\-templates\ \fIdirectory\fR
152
Applies the customizing templates in \fIdirectory\fR to the debian directory.
156
.I \-o, \-\-overlay <directory>
154
.BR \-o ", " \-\-overlay\ \fIdirectory\fR
157
155
Applies a customization template to an existing debian directory.
159
.I \-p, \-\-packagename <name>
160
Force the package name to be <name>, good for packages with hyphens in their
161
name or other strangeness. You can also make the parameter <name>_<version>
157
.BR \-p ", " \-\-packagename\ \fIname\fR
158
Force the package name to be \fIname\fR, good for packages with hyphens in their
159
name or other strangeness. You can also make the parameter
162
161
which will set both the package name and version and bypass and directory
165
.I \-d, \-\-defaultless
164
.BR \-d ", " \-\-defaultless
166
165
Skips applying the default templates to the target debian directory.
167
.BR \-h ", " \-\-help
169
168
Display the name, version, available options and authors, and exit
173
The new package will use dpatch to manage patches. This option is deprecated
174
and will be removed in future versions of \fBdh\_make\fR. Use the quilt
175
patch system which is built into the source package.
171
.BR \-r ", " \-\-rulesformat\ \fIformat\fR
172
Set the format for the debian/rules file to \fIformat\fR. The options are
173
the default Debhelper v7 minimal rules (dh7), the old rules format (old)
174
or CDBS format (cdbs).
176
.BR \-v ", " \-\-version
178
177
Show the program name and version, and exit successfully.
180
179
The following environment settings are used by \fBdh\_make\fR:
213
215
template files for the more common licenses used in Debian packages
216
To get dh\_make to use the defaults and ask you various questions about the package:
218
To get \fBdh\_make\fR to use the defaults and ask you various questions
219
228
Create your single class package using the with the GPL license:
223
237
A more involved example where you set your name in the environment, contact \
224
238
email and license in the options and specify the upstream file:
225
$ DEBFULLNAME="John Doe" \\
228
\-\-email contact@example.com \\
232
\-\-file ../foo.tar.gz
242
DEBFULLNAME="John Doe"
244
dh_make \-\-email contact@example.com \-\-copyright=bsd \\
246
\ \-\-file ../foo.tar.gz
236
252
may not detect your username and email address correctly when using sudo.
238
.BR "dpkg(1), dpkg\-buildpackage(1), debhelper(1), make\-kpkg(1), debhelper(7)"
254
.BR dpkg (1), dpkg\-buildpackage (1), debhelper (1), make\-kpkg (1), debhelper (7)
240
You may also want to read the Debian Policy (in /usr/share/doc/debian\-policy)
241
and the New Maintainers' Guide (in /usr/share/doc/maint-guide).
243
Christoph Lameter <clameter@debian.org> wrote the original script, in sh.
245
Craig Small <csmall@debian.org> made many enhancements to the script, and
246
later rewrote it in perl.
248
Bruce Sass <bsass@edmc.net> added support for customization templates.
256
You may also want to read the Debian Policy (in
257
\fI/usr/share/doc/debian\-policy \fR) and the New Maintainers' Guide (in
258
\fI/usr/share/doc/maint-guide\fR).