DEBMAKE(1)
yo bestie welcome to debmake(1) β yes, that's the manual name, and it's literally from the Debmake Manual. Buckle up, we're making Debian source packages and it's gonna slay π
π NAME π
debmake β program to make a Debian source package. That's the whole vibe. No cap. β¨
β¨ SYNOPSIS β¨
debmake [-h] [-n] [-p package] [-u version] [-r revision] [-z extension]
[-b "binarypackage[:type], ...]" [-D value] [-e foo@example.org] [-f
"firstname lastname"] [-i [debuild|sbuild|dgit sbuild|gbp
buildpackage|dpkg-buildpackage| ...]] [-m] [-q] [-v] [-V] [-w "addon,
..."] [-x [01234]] [-y] [-B] [URL]
π¦ DESCRIPTION π¦
okay so debmake helps to build the Debian package from the upstream source. That's the main character energy here. π
Normally, bestie, this is done as follows:
- The upstream source is obtained as a tarball from a remote web site or a cloned work tree using
git clone.- For a tarball, it is expanded to many files in the source directory.
- For a cloned work tree, it is used as the source directory.
debmakeis typically invoked in the source directory without any argument.- The source directory is copied to
../package-version/directory. - If
../package_version.orig.tar.xzis missing, it is generated. - The current directory is moved to
../package-version/. - Template files are generated in the
../package-version/debian/directory
- The source directory is copied to
- Files in the
../package-version/debian/directory should be manually adjusted. dpkg-buildpackage(usually from its wrapperdebuild,sbuild, ...) is invoked in the../package-version/directory to make Debian source and binary packages.
Also, debmake can be invoked with an argument. This argument can be URL for a tarball hosted on a remote web site or for a source code accessed by git clone; or local PATH to the tarball or the source code.
Arguments to -b, -f, and -w options need to be quoted to protect them from the shell. Yes, the shell is nosy like that. π
Other tools also offer ways to obtain the upstream tarball and creating required symlink to build a Debian package depending on your workflow. For example, origtargz, mk-origtargz, git-deborig, and pristine-tar.
πΈ POSITIONAL ARGUMENTS πΈ
URLβ acquire the source tree from the tarball, the git repository or the source tree at this URL (or PATH) (if missing, the source tree uses the current directory). If you don't pass it, bestie, it just uses the current directory. π«Ά
π OPTIONS π
-h,--helpβ show this help message and exit. iconic.-n,--nativeβ make a native source package without.orig.tar.xz.-p,--packagepackage β set the Debian package name.-u,--upstreamversionversion β set the upstream package version ("@"in version is replaced by"0~yymmddHHMM"timestamp).-r,--revisionrevision β set the Debian package revision ("@"in revision is replaced by"0~yymmddHHMM"timestamp).-z,--tarzextension β set the tarball compression type for the missing upstream tarball,extension=(tar.xz|tar.gz|tar.bz2)(alias:z,b,x).-b,--binaryspec"binarypackage[:type], ..."β set the binary package specs by a comma separated list ofbinarypackage:typepairs. Here,binarypackageis the binary package name, and the optionaltypeis chosen from the followingtypevalues:binβ C/C++ compiled ELF binary code package (any,foreign) (default, alias:"", i.e., null-string)dataβ Data (fonts, graphics, ...) package (all,foreign) (alias:da)devβ Library development package (any,same) (alias:de)docβ Documentation package (all,foreign) (alias:do)libβ Library package (any,same) (alias:l)perlβ Perl script package (all,foreign) (alias:pl)python3β Python (version 3) script package (all,foreign) (alias:py3,python,py)rubyβ Ruby script package (all,foreign) (alias:rb)nodejsβ Node.js based JavaScript package (all,foreign) (alias:js)scriptβ Shell and other interpreted language script package (all,foreign) (alias:sh)
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.
Here are examples for typical binary package split scenarios where the upstream Debian source package name is foo:
- Generating an executable binary package
foo:β-bβfoo:bin'β, or its short formβ-b'-'β, or no-boption
- Generating an executable (
python3) binary packagepython3-foo:β-bβpython3-foo:py'β, or its short formβ-bβpython3-foo'β
- Generating a data package
foo:β-bβfoo:data'β, or its short formβ-b'-:data'β
- Generating a executable binary package
fooand a documentation onefoo-doc:β-bβfoo:bin,foo-doc:doc'β, or its short formβ-b'-:-doc'β
- Generating a executable binary package
foo, a library packagelibfoo1, and a library development packagelibfoo-dev:β-bβfoo:bin,libfoo1:lib,libfoo-dev:dev'βor its short formβ-b'-,libfoo1,libfoo-dev'β
If the source tree contents do not match settings for type, the debmake command warns you.
-e,--emailfoo@example.orgβ set e-mail address. The default is taken from the value of the environment variable$DEBEMAIL. π-D,--debugvalue β setDEBUGenvironment variable to value for debug logging (substring of"spPd", use"_"to unsetDEBUG).-f,--fullname"firstname lastname"β set the fullname. The default is taken from the value of the environment variable$DEBFULLNAME. π«Ά-i,--invoke[debuild|sbuild|dgit sbuild|gbp buildpackage|dpkg-buildpackage| ...]β invoke package build tool.-m,--monoarchβ force packages to be non-multiarch.-q,--quitearlyβ quit early before creating files in thedebiandirectory.-v,--versionβ show version information.-V,--verboseβ use--verbosefor shell commands if available.-w,--with"addon ..."β set additionaldh --withoption arguments indebian/rules.
For Autotools based packages, if they install Python (version 3) programs, setting python3 as addon to the debmake command argument is needed since this is non-obvious. But for pyproject.toml based Python packages, setting python3 as addon to the debmake command argument is not needed since this is obvious and the debmake command automatically set it to the dh(1) command.
-x,--extra[01234]β generate extra configuration files as templates (default:2).
Please note debian/changelog, debian/control, debian/copyright, debian/rules, and debian/source/format are required configuration files to build a modern Debian binary package.
The number determines which configuration templates are generated.
-x0: all 5 required configuration template files. (selected option if any of these required files already exist)-x1: all-x0files + desirable configuration template files with binary package type supports.-x2: all-x1files + normal configuration template files with maintainer script supports. (default)-x3: all-x2files + optional configuration template files.-x4: all-x3files + deprecated configuration template files.
Some configuration template files are generated with the extra .ex suffix to ease their removal. To activate these, rename their file names to the ones without the .ex suffix and edit their contents.
Existing configuration files are never overwritten. If you wish to update some of the existing configuration files, please rename them before running the debmake command and manually merge the generated configuration files with the old renamed ones.
-y,--yesβ use once to βforce yesβ for all prompts, twice to βforce noβ.-B,--backupβ keep the user editted ones without.exsuffix and create template files with.exsuffix.
π₯ 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.
- For a typical C program source tree packaged with
autoconf/automake:
debmake -i sbuild
- For a typical Python (version 3) module source tree:
debmake -b":python3" -i sbuild
- For a typical Python (version 3) module in the
package-version.tar.xzarchive:
debmake package-version.tar.xz -b":python3" -i sbuild
- For a typical Perl module in the
package-version.tar.xzarchive:
debmake package-version.tar.xz -b":perl" -i sbuild
π HELPER PACKAGES π
Packaging may require installation of some additional specialty helper packages. Like, the side quests.
- Python (version 3) programs may require the
pybuild-plugin-pyprojectpackage. - The Autotools (
autoconf+automake) build system may requireautotools-devordh-autoreconfpackage. - Ruby programs may require the
gem2debpackage. - Node.js based JavaScript programs may require the
pkg-js-toolspackage. - Java programs may require the
javahelperpackage. - Gnome programs may require the
gobject-introspectionpackage. - etc.
π CAVEAT π
okay bestie, real talk for a sec. debmake is meant to hand the package maintainer a bunch of template files to work on, but ngl, actual packaging activities are often performed without using debmake at all, just by referencing only existing similar packages and the βDebian Policy Manualβ (https://www.debian.org/doc/debian-policy/). And the thing you gotta internalize: all template files generated by debmake are required to be modified manually. Every single one. It's giving starting point, not finished product. π
There are some points for debmake:
- debmake helps to write the terse packaging tutorial βGuide for Debian Maintainersβ (
https://www.debian.org/doc/manuals/debmake-doc/) (thedebmake-docpackage). - debmake provides short extracted license texts as
debian/copyrightin decent accuracy to help license review. - βGuide for Debian Maintainersβ also serves as a tutorial with examples for the usage of debmake.
- debmake internally calls
licensecheckfrom thelicensecheckpackage to createdebian/copyrightif it doesnβt exist. - debmake internally calls
lrcfrom thelicensereconpackage to verifydebian/copyrightif it already exists.
okay so there are also 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:
- Upstream package name (
-p):[-+.a-z0-9]{2,} - Binary package name (
-b):[-+.a-z0-9]{2,} - Upstream version (
-u):[0-9][-+.:~a-z0-9A-Z]* - Debian revision (
-r):[0-9][+.~a-z0-9A-Z]*
See the exact definition in βChapter 5 - Control files and their fieldsβ (https://www.debian.org/doc/debian-policy/#document-ch-controlfields) 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. fr fr, that's the move. π«Ά
The character set in the environment variable $DEBUG determines the logging output level.
s: program progress loggingp: keypara[..]value loggingP: allpara[..]value loggingd:para["debs"]value logging
Use this feature as:
[base_dir] $ export DEBUG=spd; debmake ...
or
[base_dir] $ debmake -D spd ...
See README.md in the source for more. iykyk π
π AUTHOR π
Copyright Β© 2014-2026 Osamu Aoki osamu@debian.org
π LICENSE π
Expat License
π¦ SEE ALSO π¦
The debmake-doc package provides the βGuide for Debian Maintainersβ (https://www.debian.org/doc/manuals/debmake-doc/) in plain text, HTML and PDF formats under the /usr/share/doc/debmake-doc/ directory. π
See also licensecheck(1), lrc(1), dpkg-source(1), deb-control(5), debhelper(7), dh(1), dpkg-buildpackage(1), debuild(1), quilt(1), dpkg-depcheck(1), sbuild(1), gbp-buildpackage(1), and gbp-pq(1) manpages.
and that's the whole page bestie π This is the DEBMAKE(1) manpage, dated 2026-02-08 β that's the version/date stamp at the bottom of the page. go forth and package slay, periodt. πβ¨
π¦ where this page comes from
- ubuntu resolute: debmake 5.1.5 Β· MIT
- ubuntu stonking: debmake 5.1.5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms