CDBS est un outil qui utilise debhelper pour afin de rendre la construction et la maintenance de paquets Debian encore plus simple. Il a plusieurs avantages :
Il produit un debian/rules
court, lisible et efficace.
Il automatise debhelper et autotools pour vous, afin de ne pas avoir à se préoccuper des tâches répétitives.
Il vous aide à vous concentrer sur les problèmes d'empaquetage plus importants, parce qu'il vous aide sans limiter la personnalisation.
Ses fonctionnalités ont été largement testées, afin que vous ne dussiez point recourir à de sombres bidouilles pour résoudre des problèmes communs.
Passer à CDBS est simple
Il est extensible
Utiliser CDBS pour les paquets Ubuntu est très simple. Après avoir ajouté cdbs à Build-Depends dans debian/control
, un fichier debian/rules
basique utilisant CDBS peut se résumer en 2 lignes. Pour une application simple en C/C++ sans règles spéciales, telle que hello, debian/rules
pourrait ressembler à ça :
#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk
That is all you need to build the program! CDBS handles installing and
cleaning. You can then use the .install
and
.info
files to tune your package with the usual
debhelper functions in the various sections for
debian/rules
.
Do not use DEB_AUTO_UPDATE_DEBIAN_CONTROL:=yes to
automatically change debian/control
. It can
cause bad things, and Debian considers it a reason to reject a package
from entering the archives. See
http://ftp-master.debian.org/REJECT-FAQ.html for more
information.
As you can see, CDBS mostly works by including .mk
Makefiles in debian/rules
. The
cdbs package provides such files in
/usr/share/cdbs/1/
that allow you to do quite a lot
of packaging tasks. Other packages, such as quilt, add
modules to CDBS and can be used as Build-Depends. Note that you can
also use your own CDBS rules and include them in the package. The most
useful modules included with the cdbs package
are:
rules/debhelper.mk
: Calls debhelper
in all required sections
rules/dpatch.mk
: Allows you to use
dpatch to ease patching the source
rules/simple-patchsys.mk
: Provides a
very easy way to patch the source
rules/tarball.mk
: Allows you to build
packages using the compressed tarball in the
package
class/autotools.mk
: Calls autotools
in all required sections
class/gnome.mk
: Builds GNOME programs
(requires the proper Build-Depends in
debian/control
)
class/kde.mk
: Builds KDE programs
(requires the proper Build-Depends in
debian/control
)
class/python-distutils.mk
:
Facilitates packaging Python programs
For more information on CDBS, see Marc Dequènes's guide at https://perso.duckcorp.org/duck/cdbs-doc/cdbs-doc.xhtml.