NAME¶debmake - program to make a Debian source package
SYNOPSIS¶debmake [-h] [-c | -k] [-n | -a package-version.orig.tar.gz | -d | -t ] [-p package] [-u version] [-r revision] [-z extension] [-b "binarypackage, ...]" [-e firstname.lastname@example.org] [-f "firstname lastname"] [-i "buildtool" | -j] [-l license_file] [-m] [-o file] [-q] [-s] [-v] [-w "addon, ..."] [-x ] [-y] [-L] [-P] [-T]
DESCRIPTION¶debmake helps to build a Debian package from the upstream source. Normally, this is done as follows:
Make sure to protect the arguments of the -b, -f, -l, and -w options from shell interference by quoting them properly.
optional arguments:¶-h, --help
The debian/copyright file must be organized to list the generic file patterns before the specific exceptions.
If you are thinking of packaging a Debian-specific source tree with debian/* in it into a native Debian package, please think otherwise. You can use the “debmake -d -i debuild” or “debmake -t -i debuild” commands to make a “3.0 (quilt)” format non-native Debian package. The only difference is that the debian/changelog file must use the non-native version scheme: version-revision. The non-native package is more friendly to downstream distributions.
-a package-version.tar.gz, --archive package-version.tar.gz
The upstream tarball may be specified as package_version.orig.tar.gz and tar.gz. For other cases, it may be tar.bz2, or tar.xz.
If the specified upstream tarball name contains uppercase letters, the Debian package name is generated by converting them to lowercase letters.
The “debmake -d” command is designed to run in the package/ directory hosting the upstream VCS with the build system supporting the “make dist” command equivalents. (automake/autoconf, Python distutils, ...)
The “debmake -t” command is designed to run in the package/ directory hosting the upstream VCS. Unless you provide the upstream version with the -u option or with the debian/changelog file, a snapshot upstream version is generated in the 0~%y%m%d%H%M format, e.g., 0~1403012359, from the UTC date and time. The generated tarball excludes the debian/ directory found in the upstream VCS. (It also excludes typical VCS directories: .git/ .hg/ .svn/ .CVS/.)
-p package, --package package
-u version, --upstreamversion version
-r revision, --revision revision
-z extension, --targz extension
-b "binarypackage[:type],...", --binaryspec "binarypackage[:type],..."
Here, binarypackage is the binary package name, and the optional type is chosen from the following type values:
The pair values in the parentheses, such as (any, foreign), are the Architecture and Multi-Arch stanza values set in the debian/control file.
In many cases, the debmake command makes good guesses for type from binarypackage. If type is not obvious, type is set to bin. For example, libfoo sets type to lib, and font-bar sets type to data, ...
If the source tree contents do not match settings for type, the debmake command warns you.
-e email@example.com, --email firstname.lastname@example.org
The default is taken from the value of the environment variable $DEBEMAIL.
-f "firstname lastname", --fullname "firstname lastname"
The default is taken from the value of the environment variable $DEBFULLNAME.
-i "buildtool", --invoke "buildtool"
The default is not to execute any program.
Setting this option automatically sets the --local option.
-l "license_file,...", --license "license_file,..."
The default is to add COPYING and LICENSE, and license_file needs to list only the additional file names all separated by “,”.
-o file, --option file
The content of file is sourced as the Python3 code at the end of para.py. For example, the package description can be specified by the following file.
para['desc'] = 'program short description' para['desc_long'] = '''\ program long description which you wish to include. . Empty line is space + . You keep going on ... '''
-w "addon,...", --with "addon,..."
The addon values are listed all separated by “,”, e.g., “-w "python2,autoreconf"”.
For Autotools based packages, setting autoreconf as addon forces running “autoreconf -i -v -f” for every package building. Otherwise, autotools-dev as addon is used as the default.
For Autotools based packages, if they install Python programs, python2 as addon is needed for packages with “compat < 9” since this is non-obvious. But for setup.py based packages, python2 as addon is not needed since this is obvious and it is automatically set for the dh(1) command by the debmake command when it is required.
-x n, --extra n
The number n determines which configuration templates are generated.
EXAMPLES¶For a well behaving source, you can build a good-for-local-use installable single Debian binary package easily with one command. Test install of such a package generated in this way offers a good alternative to the traditional “make install” command installing into the /usr/local directory since the Debian package can be removed cleanly by the “dpkg -P ...” command. Here are some examples of how to build such test packages. (These should work in most cases. If the -d option does not work, try the -t option instead.)
For a typical C program source tree packaged with autoconf/automake:
For a typical Python module source tree:
For a typical Python module in the package-version.tar.gz archive:
For a typical Perl module in the Package-version.tar.gz archive:
HELPER PACKAGES¶Packaging may require installation of some additional specialty helper packages.
CAVEAT¶debmake is meant to provide template files for the package maintainer to work on. Comment lines started by # contain the tutorial text. You must remove or edit such comment lines before uploading to the Debian archive.
The license extraction and assignment process involves a lot of heuristics; it may fail in some cases. It is highly recommended to use other tools such as licensecheck from the devscripts package in conjunction with debmake.
There are some limitations for what characters may be used as a part of the Debian package. The most notable limitation is the prohibition of uppercase letters in the package name. Here is a summary as a set of regular expressions:
See the exact definition in Chapter 5 - Control files and their fields in the “Debian Policy Manual”.
debmake assumes relatively simple packaging cases. So all programs related to the interpreter are assumed to be "Architecture: all". This is not always true.
DEBUG¶Please report bugs to the debmake package using the reportbug command.
The character set in the environment variable $DEBUG determines the logging output level.
Use this as:
$ DEBUG=pdfbmeclak debmake ...
See README.developer in the source for more.
AUTHOR¶Copyright © 2014-2017 Osamu Aoki <email@example.com>
SEE ALSO¶The debmake-doc package provides the “Guide for Debian Maintainers” in plain text, HTML and PDF formats under the /usr/share/doc/debmake-doc/ directory.
See also dpkg-source(1), deb-control(5), debhelper(7), dh(1), dpkg-buildpackage(1), debuild(1), quilt(1), dpkg-depcheck(1), pdebuild(1), pbuilder(8), cowbuilder(8), gbp-buildpackage(1), gbp-pq(1), and git-pbuilder(1) manpages.