=== Debian package building reminders

Here are some reminders for the Debian package building.

* The *debmake* command aims to address typical packaging situation only.
* The Debian package generated by the above package building workflow is in the *non-native* package format.
* The Debian source package means the set of input files used to build the Debian binary package building and is not a single file.
* A single Debian source package may generate multiple Debian binary packages defined in the *debian/control* file.
* The *debian/rules* file is a makefile.
** The *debian/rules* file may be crafted primarily by a single "*dh $@*" command while using *dh_** commands as its backend. (recommended approach by this author)
** The *debian/rules* file can be customized by optional "*override_dh_*:*" targets.
** Both *dh* and *dh_** commands are a part of the *debhelper* package (see *debhelper*(8)).
** The *debhelper* package works best if the build system of the upstream tarball is made to support the *$(DESTDIR)* feature (a part of GNU coding standard).
** The *$(DESTDIR)* feature is supported by many build systems such as Autotools, CMake, Python Distutils, etc.
* The *dpkg-buildpackage*(1) command is usually invoked by a wrapper script which sets up the proper build environments.
** *debuild*(1)
** *pdebuild*(1) (optionally with *cowbuilder*(8))
** *gbp-buildpackage*(1) (use *git-pbuilder*(1) and *cowbuilder*(8) as a part of its backend)
* The *debmake*(1) command helps to generate packaging template files and automating the sequence of associated routine tasks.
** Use *script* type and customize the *debian/control* file if any other interpreter is used.
** Use *bin* type and customize the *debian/control* file if any other compiler is used.
** The *debmake* command is designed to make the *multiarch* package as default.
*** The *-m* option needs to be specified to make the *non-multiarch* package.
** Fancy multiarch "*allowed*" packages etc. need to be manually set in the *debian/control* file.
* Some people promote to package even programs which have been written especially for Debian in the non-native package format with the above workflow while generating the required tarball without *debian/** files by oneself in advance. They claim that the use of non-native package format eases communication with the downstream distributions.


