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

NAME

6       dh_make - prepare Debian packaging for an original source archive
7

SYNOPSIS

9       dh_make [option]...
10

DESCRIPTION

12       dh_make  is  a  tool  to convert a regular source code package into one
13       formatted according to the requirements of the Debian Policy.   dh_make
14       must  be  invoked  within a directory containing the source code, which
15       must be named <packagename>-<version>.  The <packagename> must  be  all
16       lowercase,  The <packagename> and <version> must be all lowercase, dig‐
17       its and dashes. The <version> can also contain digits, and the  symbols
18       plus, dot, tilde. The <version> must start with a digit.  If the direc‐
19       tory name does not conform to this scheme, you must  rename  it  before
20       using dh_make.  Alternatively, you may be able to use the --packagename
21       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
46              exists, 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
50              Debian  tools  to  generate  the  diffs  to the original sources
51              required by the Debian packaging format.  Unless there are  rea‐
52              sons  against  it, this file should be the pristine upstream ar‐
53              chive.
54
55       Then dh_make proceeds to generate a "debian" subdirectory and the  nec‐
56       essary  control  files  in  the program source directory. Those control
57       files are customized with the packagename and  version  extracted  from
58       the directory name.
59
60       dh_make  makes several attempts to obtain the username. It first checks
61       for the environment variables $DEBFULLNAME, $LOGNAME is used to find  a
62       name in the /etc/passwd file, and through NIS, YP and LDAP.
63
64       The  e-mail  address can either be specified with the -fB--email option
65       or dh_make will attempt to find it. It will first check the environment
66       variables  $DEBEMAIL  and then $EMAIL. If they are not set then dh_make
67       will search an available LDAP directory using ldapsearch(1) using $LOG‐
68       NAME  as  the  uid  to  search under.  Finally it will use $LOGNAME and
69       /etc/mailname to generate an email address.
70
71       dh_make will also generate example files that are also  customized  for
72       the  package generated. You can remove all files with *.ex if you wish.
73       You can also delete the README.Debian file if you don't  have  anything
74       to put in it.  Renaming the example files to their name without the .ex
75       at the end (and editing them if necessary) will activate  that  feature
76       of debhelper.
77
78       If  the --templates or -o (--overlay) option is used dh_make will apply
79       a customizing template to the "debian"  directory.  See  the  templates
80       described in the FILES section of this manpage for samples.
81

OPTIONS

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

ENVIRONMENT

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

FILES

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

EXAMPLES

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

BUGS

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

SEE ALSO

227       dpkg(1),dpkg-buildpackage(1),dh(1),make-kpkg(1),debhelper(7)
228
229       You   may   also   want    to    read    the    Debian    Policy    (in
230       /usr/share/doc/debian-policy  )  and  the  New  Maintainers'  Guide (in
231       /usr/share/doc/maint-guide).
232
233
234
235Debian Project                    2018-06-08                        DH_MAKE(1)
Impressum