1DH_MAKE(1)                  General Commands Manual                 DH_MAKE(1)
2
3
4

NAME

6       dh_make - prepare upstream source for Debian packaging
7

SYNOPSIS

9       dh_make [option]...
10

DESCRIPTION

12       dh_make  is  a  tool that adds necessary files for making Debian source
13       package from upstream source according to the requirements of  the  De‐
14       bian Policy.  dh_make must be invoked within a directory containing the
15       source code, which must be named <packagename>-<version>.  The  <packa‐
16       gename>  must be all lowercase, The <packagename> and <version> must be
17       all lowercase, digits and dashes. The <version> can also  contain  dig‐
18       its,  and the symbols plus, dot, tilde. The <version> must start with a
19       digit.  If the directory name does not conform to this scheme, you must
20       rename  it before using dh_make.  Alternatively, you may be able to use
21       the --packagename option to force the package name.
22
23   PACKAGE CLASSES
24       Classes can be set with the single direct options (such as --s for sin‐
25       gle) or with the -C,--packageclass option (-C=s for single).
26
27       Single binary (s)
28              The  package  will  generate a single binary .deb package. It is
29              the standard case, so if you don't know what to do, choose this.
30
31       Arch-Independent (i)
32              The package will generate a single package that is arch-indepen‐
33              dent.
34
35       Library (l)
36              The  package  will  generate  at least two binaries. One library
37              package  containing  just  the  lib  in  /usr/lib  and   another
38              *-dev_*.deb package containing documentation and C headers.
39
40
41          ACTIONS PERFORMED
42              Unless  --native was given, dh_make makes sure a original source
43              archive (<packagename>_<version>.orig.tar.gz)  exists.  The  ar‐
44              chive can either end with .gz or one of the other supported com‐
45              pression extensions such as bz2 or lzma.  If no  such  file  ex‐
46              ists,  the  file specified with -f is copied in place.  If no -f
47              is supplied either but --createorig is, the current directory is
48              created    into    a    new    archive    ../<packagename>-<ver‐
49              sion>.orig.tar.gz The original archive is needed for  other  De‐
50              bian  tools  to  generate  the diffs to the original sources re‐
51              quired by the Debian packaging format.  Unless there are reasons
52              against it, this file should be the pristine upstream archive.
53
54       Then  dh_make proceeds to generate a "debian" subdirectory and the nec‐
55       essary control files in the program  source  directory.  Those  control
56       files  are  customized  with the packagename and version extracted from
57       the directory name.
58
59       dh_make makes several attempts to obtain the username. It first  checks
60       for  the environment variables $DEBFULLNAME, $LOGNAME is used to find a
61       name in the /etc/passwd file, and through NIS, YP and LDAP.
62
63       The e-mail address can either be specified with the  -fB--email  option
64       or dh_make will attempt to find it. It will first check the environment
65       variables $DEBEMAIL and then $EMAIL. If they are not set  then  dh_make
66       will search an available LDAP directory using ldapsearch(1) using $LOG‐
67       NAME as the uid to search under.  Finally  it  will  use  $LOGNAME  and
68       /etc/mailname to generate an email address.
69
70       dh_make  will  also generate example files that are also customized for
71       the package generated. You can remove all files with *.ex if you  wish.
72       You  can  also delete the README.Debian file if you don't have anything
73       to put in it.  Renaming the example files to their name without the .ex
74       at  the  end (and editing them if necessary) will activate that feature
75       of debhelper.
76
77       If the --templates or -o (--overlay) option is used dh_make will  apply
78       a customizing template to the "debian" directory. See the templates de‐
79       scribed in the FILES section of this manpage for samples.
80

OPTIONS

82       -c, --copyright license
83              Use license type in copyright  file.   license  can  be  apache,
84              artistic,  bsd, expat, gpl, gpl2, gpl3, isc, lgpl, lgpl2, lgpl3,
85              or custom.  If this field is not specified  the  copyright  file
86              has  a space to fill in which sort of license is used. The field
87              is case-insensitive so -c GPL works as well as -c gpl.  gpl  and
88              lgpl  will  give  you  version  3  of the corresponding license,
89              apache implies Apache v2.0. If you  need  a  different  version,
90              change the license file afterwards or use the gpl2 and lgpl2 op‐
91              tions.  If you select custom here  you  will  need  to  use  the
92              --copyrightfile option as well.
93
94       --copyrightfile filename
95              When using the custom --copyright option this is the location of
96              your custom copyright file. dh_make will process this file  just
97              like  the  standard copyright files. It is suggested you use one
98              of the existing license files as a starting point.
99
100       --docs Create a separate PACKAGE-doc binary package.  All  found  docu‐
101              ments in the source package will be installed here.
102
103       -e, --email address
104              Use  address  as  the e-mail address in the Maintainer: field of
105              debian/control file.
106
107       -n, --native
108              Create a native Debian packages, i.e. do not  generate  a  .orig
109              archive,  since  it  will  be generated when building with dpkg-
110              buildpackage.  The version number will not have a  Debian  revi‐
111              sion number (e.g. -1) appended to it.
112
113       -f, --file file
114              Use file as the original source archive, and skip the copying of
115              the current program tree to program.orig.
116
117       -l, --library
118              Automatically set the package class  to  Library,  skipping  the
119              question.
120
121       -s, --single
122              Automatically  set  the package class to Single binary, skipping
123              the question.
124
125       -i, --indep
126              Automatically set the package class to arch-independent  binary,
127              skipping the question.
128
129       -a, --addmissing
130              Adds  missing  example  and  control files on an existing debian
131              source directory.
132
133       -t, --templates directory
134              Applies the customizing templates in directory to the debian di‐
135              rectory.
136
137       -o, --overlay directory
138              Applies  a  customization  template to an existing debian direc‐
139              tory.
140
141       -p, --packagename name
142              Force the package name to be name, good for  packages  with  hy‐
143              phens  in their name or other strangeness. You can also make the
144              parameter name_version which will set both the package name  and
145              version and bypass and directory checking.
146
147       -d, --defaultless
148              Skips applying the default templates to the target debian direc‐
149              tory. Generally used in conjunction with either the --overlay or
150              --templates options.
151
152       -h, --help
153              Display  the  name,  version, available options and authors, and
154              exit successfully.
155
156       -v, --version
157              Show the program name and version, and exit successfully.
158
159       -y, --yes
160              Automatic yes to prompts and run non-interactively.  The package
161              class needs to be set for dh_make to run fully automatically.
162

ENVIRONMENT

164       The following environment settings are used by dh_make:
165
166       DEBEMAIL
167              Email address to use in control and changelog entries.
168
169       DEBFULLNAME
170              You  full  name,  eg "John Doe" which will appear in the control
171              and changelog entries.
172
173       EMAIL  Email address to use in control and changelog entries, only used
174              if DEBEMAIL is no set.
175
176       LOGNAME
177              Default  username  used  for  looking  up email and full name in
178              other directories.
179

FILES

181       /usr/share/debhelper/dh_make
182              Directory that contains all the template files, separated in six
183              directories:
184
185       debian/
186              with files for all package classes,
187
188       debians/
189              with files specific to the Single binary class,
190
191       debianl/
192              with files specific to the Library class, and finally,
193
194       native/
195              with files specific to the native Debian packages.
196
197       licenses/
198              template files for the more common licenses used in Debian pack‐
199              ages
200

EXAMPLES

202       To get dh_make to use the defaults and ask you various questions  about
203       the package
204
205           dh_make
206
207
208       Create your single class package using the with the GPL license:
209
210           dh_make -s -c gpl
211
212
213       A  more  involved  example  where you set your name in the environment,
214       contact email and license in the options and specify the upstream file:
215
216           DEBFULLNAME="John Doe"
217           dh_make --email contact@example.com --copyright=bsd \
218            --file ../foo.tar.gz
219
220

BUGS

222       dh_make may not detect your username and email address  correctly  when
223       using sudo.
224

SEE ALSO

226       dpkg(1),dpkg-buildpackage(1),dh(1),make-kpkg(1),debhelper(7)
227
228       You  may  also  want  to  read the Debian Policy (in /usr/share/doc/de‐
229       bian-policy ) and the New Maintainers' Guide (in  /usr/share/doc/maint-
230       guide).
231
232
233
234Debian Project                    2021-09-21                        DH_MAKE(1)
Impressum