File: 02-overview.txt

package info (click to toggle)
debmake-doc 1.22-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 12,952 kB
  • sloc: makefile: 916; sh: 692; python: 202; ansic: 114; sed: 16
file content (43 lines) | stat: -rw-r--r-- 3,087 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// vim:set filetype=asciidoc:
The Debian packaging of the __package-1.0__**.tar.gz**, containing a simple C source following the "`https://www.gnu.org/prep/standards/[GNU Coding Standards]`" and "`https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard[FHS]`", can be done with the *debmake* command as follows.

----
 $ tar -xvzf package-1.0.tar.gz
 $ cd package-1.0
 $ debmake
   ... Make manual adjustments of generated configuration files
 $ debuild
----

If manual adjustments of generated configuration files are skipped, the generated binary package lacks meaningful package description but still functions well under the *dpkg* command to be used for your local deployment.

CAUTION: The *debmake* command only provides decent template files. These template files must be manually adjusted to their perfection to comply with the strict quality requirements of the Debian archive, if the generated package is intended for general consumption.

If you are new to Debian packaging, focus on understanding the overall process rather than worrying about the details.

If you are familiar with Debian packaging, you'll notice that *debmake* is similar to the *dh_make* command. This is because *debmake* is designed to replace the functionality historically provided by *dh_make*. footnote:[Before *dh_make*, the *deb-make* command was popular. The current *debmake* package starts its version from *4.0* to avoid version conflicts with the obsolete *debmake* package, which provided the "`*deb-make*`" command.]

The *debmake* command is designed with the following features:

* modern packaging style
** *debian/copyright*: "`https://dep-team.pages.debian.net/deps/dep5/[DEP-5]`" compliant
** *debian/control*: *substvar* support, *multiarch* support, multi binary packages, ...
** *debian/rules*: *dh* syntax, compiler hardening options, ...
* flexibility
** many options (see "`<<boption>>`", "`<<manpage>>`", and "`<<options>>`")
* sane default actions
** execute non-stop with clean results
** generate the multiarch package, unless the *-m* option is explicitly specified.
** generate the non-native Debian package with the Debian source format "`**3.0 (quilt)**`", unless the *-n* option is explicitly specified.
* extra utility
** verification of the *debian/copyright* file against the current source (see "`<<koption>>`")

The *debmake* command delegates most of the heavy lifting to its back-end packages: *debhelper*, *dpkg-dev*, *devscripts*, *sbuild*, *schroot*, etc.

TIP: Ensure that you properly quote the arguments of the *-b*, *-f*, *-l*, and *-w* options to protect them from shell interference.

TIP: The non-native Debian package is the normal Debian package.

TIP: The detailed log of all the package build examples in this document can be obtained by following the instructions in "`<<details>>`".

NOTE: The generation of the *debian/copyright* file, and the outputs from the *-c* (see "`<<coption>>`") and *-k* (see "`<<koption>>`") options involve heuristic operations on the copyright and license information.  They may produce some erroneous results.