~josephjamesmills/ubuntu/quantal/dh-make/fixed-bug-1048908

« back to all changes in this revision

Viewing changes to dh_make.1

  • Committer: Bazaar Package Importer
  • Author(s): Craig Small
  • Date: 2011-01-05 14:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110105141103-xscg3pn4lqzeobhy
Tags: 0.56
* cdbs is no longer a package type but a rules format
* New option rulesformat or -r which can be dh7, old or cdbs
* Changed from svn to git maintenance
* Updated to standards version 3.9.1 Closes: #599853
* make tar instead of directory for --createorig  Closes: #580804
* CMakeLists.txt not added to docs Closes: #587144
* dpatch option removed Closes: #589264
* BSD license has full copy Closes: #598409
* Debian packaging defaults to same license as package, where possible
  Closes: #598411
* Updated man page to fit new/removed commands

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH DH_MAKE 8 "1 February 2010" "Debian Project" \" -*- nroff -*-
 
1
.TH DH_MAKE 8 2011-01-04 "Debian Project"
2
2
.SH NAME
3
3
dh_make \- prepare Debian packaging for an original source archive
4
4
.SH SYNOPSIS
5
5
.B dh_make
6
 
[\-bnlsmiadh] [\-c license] [\-e address] [\-f file] [\-t directory]
 
6
[\-nlsmiadhr] [\-c license] [\-e address] [\-f file] [\-t directory]
7
7
[\-o directory] [\-p name] [\-\-copyright license]
8
8
[\-\-email address] [\-\-native] [\-\-file file]
9
9
[\-\-library] [\-\-single] [\-\-indep] [\-\-multi] [\-\-kmod] [\-\-kpatch] 
10
10
[\-\-addmissing]
11
11
[\-\-templates directory] [\-\-defaultless] [\-\-overlay directory]
12
 
[\-\-packagename name] [\-\-dpatch] 
 
12
[\-\-packagename name] 
 
13
[\-\-rulesformat format]
13
14
[\-\-help] [\-\-version]
14
15
.SH DESCRIPTION
15
16
.B dh_make
21
22
digits and dashes. If the directory name does not conform to this scheme,
22
23
you must rename it before using 
23
24
.B dh_make.
24
 
Alternatively, you may be able to use the \-\-packagename option to force 
 
25
Alternatively, you may be able to use the \fB\-\-packagename\fR option to force 
25
26
the package name.
26
27
.br
27
 
.SH PACKAGE CLASSES
 
28
.SS PACKAGE CLASSES
28
29
.TP
29
30
.B Single binary (s)
30
31
The package will generate a single binary .deb package. It is the standard
39
40
.TP
40
41
.B Library (l)
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.
44
45
.TP
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
 
48
use with the
 
49
.BR make\-kpkg (1)
 
50
command. It also generates a binary package for
48
51
additional utilities, daemons, etc. that may come with the source.
49
52
.TP
50
 
.B cdbs (b)
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.
53
 
.TP
54
53
.B Kernel patch
55
54
The package will generate a package that can be used for kernel patches.
56
 
.SH ACTIONS PERFORMED
57
 
Unless \-\-native was given, 
 
55
.SS ACTIONS PERFORMED
 
56
Unless \fB\-\-native\fR was given, 
58
57
.B dh_make
59
58
makes sure a original source archive (<packagename>_<version>.orig.tar.gz)
60
 
exists.
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
71
71
.B dh_make
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
76
 
.B $DEBFULLNAME
77
 
if this exists.  If not the environment variable
78
 
.B $LOGNAME
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.
81
 
.PP
82
 
If the environment variable
83
 
.B $EMAIL
 
74
with the packagename and version extracted from the directory name.
 
75
 
 
76
.B dh_make
 
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
 
80
and LDAP.
 
81
 
 
82
The e-mail address can either be specified with the -fB\-\-email\fR option
84
83
or
85
 
.B $DEBEMAIL
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:
89
 
.PP
90
 
export DEBEMAIL="jsmith@debian.org"
91
 
.PP
 
84
.B dh_make
 
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 
 
87
.B dh_make
 
88
will search an available LDAP directory using
 
89
.BR ldapsearch (1)
 
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.
 
92
 
92
93
.B dh_make
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.
98
99
.PP
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
100
101
.B dh_make
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.
103
104
.SH OPTIONS
104
105
.TP
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. 
114
115
.TP
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.
118
119
.TP
119
 
.I \-n, \-\-native
 
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)
123
124
appended to it.
124
125
.TP
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.
128
129
.TP
129
 
.I \-l, \-\-library
 
130
.BR \-l ", " \-\-library
130
131
Automatically set the package class to Library, skipping the question.
131
132
.TP
132
 
.I \-s, \-\-single
 
133
.BR \-s ", " \-\-single
133
134
Automatically set the package class to Single binary, skipping the question.
134
135
.TP
135
 
.I \-i, \-\-indep
 
136
.BR \-i ", " \-\-indep
136
137
Automatically set the package class to arch-independent binary, skipping the question.
137
138
.TP
138
 
.I \-m, \-\-multi
 
139
.BR \-m ", " \-\-multi
139
140
Automatically set the package class to Multiple binary, skipping the question.
140
141
.TP
141
 
.I \-k, \-\-kmod
 
142
.BR \-k ", " \-\-kmod
142
143
Automatically set the package class to Kernel module, skipping the question.
143
144
.TP
144
 
.I \-b, \-\-cdbs
145
 
Automatically set package class to cdbs, skipping the question.
146
 
.TP
147
 
.I \-\-kpatch
 
145
.B \-\-kpatch
148
146
Automatically set package class to kpatch, skipping the question.
149
147
.TP
150
 
.I \-a, \-\-addmissing
 
148
.BR \-a ", " \-\-addmissing
151
149
Adds missing example and control files on an existing debian source directory.
152
150
.TP
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.
155
153
.TP
156
 
.I \-o, \-\-overlay <directory>
 
154
.BR \-o ", " \-\-overlay\ \fIdirectory\fR
157
155
Applies a customization template to an existing debian directory.
158
156
.TP
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
 
160
.IR name \_ version
162
161
which will set both the package name and version and bypass and directory
163
162
checking.
164
163
.TP
165
 
.I \-d, \-\-defaultless
 
164
.BR \-d ", " \-\-defaultless
166
165
Skips applying the default templates to the target debian directory.
167
166
.TP
168
 
.I \-h, \-\-help
 
167
.BR \-h ", " \-\-help
169
168
Display the name, version, available options and authors, and exit
170
169
successfully.
171
170
.TP
172
 
.I \-\-dpatch
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
175
.TP
177
 
.I \-v, \-\-version
 
176
.BR \-v ", " \-\-version
178
177
Show the program name and version, and exit successfully.
179
178
.SH ENVIRONMENT
180
179
The following environment settings are used by \fBdh\_make\fR:
188
187
.TP
189
188
.B EMAIL
190
189
Email address to use in control and changelog entries, only used if \fBDEBEMAIL\fR is no set.
 
190
.TP
 
191
.B LOGNAME
 
192
Default username used for looking up email and full name in other directories.
191
193
.SH FILES
192
194
.TP
193
195
.I /usr/share/debhelper/dh_make
212
214
.I licenses/
213
215
template files for the more common licenses used in Debian packages
214
216
.SH EXAMPLES
215
 
.TP
216
 
To get dh\_make to use the defaults and ask you various questions about the package:
217
 
.B dh_make
218
 
.TP
 
217
.PP
 
218
To get \fBdh\_make\fR to use the defaults and ask you various questions
 
219
about the package
 
220
.in +4n
 
221
.nf
 
222
 
 
223
dh_make
 
224
 
 
225
.fi
 
226
.in
 
227
.PP
219
228
Create your single class package using the with the GPL license:
220
 
.B dh_make
221
 
\-s \-c gpl
222
 
.TP
 
229
.in +4n
 
230
.nf
 
231
 
 
232
dh_make \-s \-c gpl
 
233
 
 
234
.fi
 
235
.in
 
236
.PP
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" \\
226
 
.br
227
 
.B dh_make
228
 
\-\-email contact@example.com \\
229
 
.br
230
 
\-\-copyright=bsd \\
231
 
.br
232
 
\-\-file ../foo.tar.gz 
233
 
 
 
239
.in +4n
 
240
.nf
 
241
 
 
242
DEBFULLNAME="John Doe"
 
243
.br
 
244
dh_make \-\-email contact@example.com \-\-copyright=bsd \\
 
245
.br
 
246
\ \-\-file ../foo.tar.gz 
 
247
 
 
248
.fi
 
249
.in
234
250
.SH BUGS
235
251
.B dh_make 
236
252
may not detect your username and email address correctly when using sudo.
237
253
.SH SEE ALSO
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)
239
255
.P
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).
242
 
.SH AUTHORS
243
 
Christoph Lameter <clameter@debian.org> wrote the original script, in sh.
244
 
.br
245
 
Craig Small <csmall@debian.org> made many enhancements to the script, and
246
 
later rewrote it in perl.
247
 
.br
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).