dh_make(1)
Create Debian package templates for a new software project.
Synopsis
dh_make [OPTION]... [-f filename]Description
dh_make converts a regular source tree into a Debian package by generating a debian/ directory with template files. It autodetects the package type (single binary, multiple binaries, library, or Perl module) and creates appropriate control files, rules, and changelog entries. This is typically the first step in packaging software for Debian.
dh_make is part of debhelper, the standard Debian packaging toolset. It simplifies the creation of debian/control, debian/rules, debian/changelog, and other required files based on the project structure.
Common options
| Flag | What it does |
|---|---|
-f | Specify the upstream source file to use (tarball path) |
-p | Set package name (overrides auto-detection from directory) |
-s | Create a single binary package (default if unclear) |
-m | Create multiple binary packages from one source |
-l | Create a library package (with appropriate naming) |
-e | Set email address for the maintainer field |
-c | Specify copyright file template (apache, gpl, mit, etc.) |
-n | Non-interactive mode, use all defaults |
--native | Create a Debian native package (no upstream version separation) |
--createorig | Create .orig.tar.gz from the source directory |
Examples
Initialize Debian packaging in extracted source directory with upstream tarball reference
cd ~/myapp-1.0 && dh_make -f ../myapp-1.0.tar.gzCreate single binary package with explicit name and maintainer email
dh_make -p mypackage -e [email protected] -sNon-interactive mode for native Debian package with MIT license template
dh_make -n --native -c mitCreate library package with proper naming convention for shared library
dh_make -l -p libmylib1 -e [email protected]Create multi-binary package layout for source that builds multiple binaries
dh_make -m -f ../myapp-2.0.tar.gzInitialize packaging and automatically create .orig.tar.gz from current directory
dh_make -n --createorig