Debhelper
Encyclopedia
debhelper is a suite of programs originally written by Joey Hess that help a Debian
packager write rules files. A rules file is a makefile that contains instructions for building and creating a Debian package.
debhelper can greatly simplify things. Debian includes packages of GNU hello
made both with and without debhelper as examples for packagers. The rules file that does not use debhelper is 2,174 characters. In contrast, the version that uses debhelper is 783 characters.
Version 7 of debhelper introduced the
#!/usr/bin/make -f
%:
dh $@
Although closely related to it, dh_make is not part of debhelper; it was separately developed by Craig Small.
Debian
Debian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...
packager write rules files. A rules file is a makefile that contains instructions for building and creating a Debian package.
Overview
There are many tasks that need to be performed over and over again in the rules files. Instead of cutting and pasting code to do these tasks, debhelper allows a packager to simply call one of its 58 programs to do the task for them.debhelper can greatly simplify things. Debian includes packages of GNU hello
GNU Hello
GNU Hello is an almost-trivial free software program that exists in order to demonstrate how a range of functionality can be implemented according to the GNU coding standards and GNU maintainer practices. As such, it can serve as a template for new, more serious, software projects....
made both with and without debhelper as examples for packagers. The rules file that does not use debhelper is 2,174 characters. In contrast, the version that uses debhelper is 783 characters.
Version 7 of debhelper introduced the
dh
helper, which can significantly simplify rules files for common cases. A debhelper 7 powered rules file can be as short as 3 lines, or 29 characters:#!/usr/bin/make -f
%:
dh $@
dh_make
Related to debhelper, there is also a tool called dh_make. dh_make copies templates of all of the files needed to build a debian package to the source directory of a program. These templates are customized slightly based on information that the user gives and on a cursory examination of how the source code is built. After running dh_make, a developer still has to edit most of the template files to be able to build the package.Although closely related to it, dh_make is not part of debhelper; it was separately developed by Craig Small.
See also
- CDBSCDBSCDBS is a system that greatly aids in the creation of Debian packages, which are software packages that make the installation of software much easier on Debian GNU/Linux and its derivatives. CDBS is an acronym for Common Debian Build System...
builds on debhelper to allow a user to write even shorter rules files. - DebianDebianDebian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...
GNU/Linux - Debian build toolchainDebian build toolchainThe Debian build toolchain is a collection of software utilities used to create Debian source packages and Debian binary packages from upstream source tarballs....