The Debian Build System
Learn how to create a Debian package using the Debian build system.
We'll cover the following...
Most or even all packages in the official Debian repository use the same build system based on a standard directory layout.
This build system reads files within the debian
directory of the project and typically involves the
This standard build system is structured in a sequence of phases that
assemble the files for the final Debian package in the directory
debian/<packagename>
. At the end, one of the debhelper tools, dh_builddeb
, is called to create the
actual .deb
file.
A minimal package
Let’s use the debhelper toolchain to create a minimal Debian package called hello-debian
.
We start with an empty directory for our We start with an empty directory for our project, create a debian
directory in it, and declare our debhelper compatibility level:
$ mkdir -p hello-debian/debian$ cd hello-debian/debian$ echo 13 > compat
At the time of writing, the highest compatibility level is 13, and levels lower than 10 are not recommended.
Note: The debhelper tools try very hard to ...