Debian Packaging Handbook/ Creation

Creating packages

The following section describes the method of creating Debian "source" packages, which can then be built for various architectures and then, if you so desire, be submitted to the Debian project for inclusion in their repositories, provided the package adheres to the packaging and license requirements demanded by Debian. This is not the way to develop binary packages. For more on that, see http://tldp.org/HOWTO/Debian-Binary-Package-Building-HOWTO/

Debian package types

General (non-native)

Most Debian packages are .deb packages which are actually obtained by compiling an existing software release from source. For example, "kpat" is a Debian package obtained using the "KPatience" tarballs released by the KDE project. So, the Debian package maintainer obtains the source from the KPat website, compiles it using a procedure to make a .deb, and then submits (uploads) it into the Debian servers. This is the system in place for most Debian packages, and is what you will probably be making if you are reading this document.

Native

There are, however, some packages in Debian which are mostly useful only for Debian, and are developed in-house by the Debian project and not obtained from an external source. Such packages are called "native" packages since they are native to the Debian system and they have slightly different packaging rules.

Pre-requirements

TODO

Getting the source

from a tarball

TODO

from a revision control system

TODO

Packaging tools

dh-make

TODO

dh-make-perl

TODO

debhelper

TODO

CDBS

TODO

Benefits

TODO

Drawbacks

TODO

yada

TODO

devscripts

TODO

debnest

TODO

Initial "debianization"

Naming

TODO

Initial version number

TODO

Editing debian/ files

TODO

required files

====== debian/copyright ====== ====== debian/changelog ====== ====== debian/control ====== ======= finding build-dependencies ======= ======= using debian-xcontrol ======= ====== debian/rules ======

other files

====== debian/compat ====== ====== debian/docs ====== ====== debian/dirs ====== ====== debian/menu ====== ====== debian/watch ====== Nelson gave an informal description in debian/watch. Maybe this could be recycled.

Creating menu icons

TODO

Creating manpages for Debian

====== Dealing with TROFF source ====== ====== Using Docbook ======

Editing other files

TODO

Packaging

Splitting your application into multiple binary packages

Packaging according to the build system

Simple top level Makefile

TODO

autotools

====== How to package upstream source which uses automake and autoconf and contains generated files ======

Python distutils

TODO

… other tips

TODO

Building packages

Pre-requirements

TODO

Building tools

debuild

debuild will automatically run lintian or linda, but their warning and error messages may scroll off the screen. However, debuild also creates a log file of the entire build in the parent of the source directory (with the file extension .build). You may find it convenient to open the build log in your editor to review the lintian messages.

pbuilder and cowbuilder

====== setting pbuilder/cowbuilder with a chroot environment ====== ======= keeping all the stuff in the home directory =======

debaux-build

TODO

sbuild

TODO

Other tools useful when building

ccache

TODO