next up previous contents
Next: Building the package Up: Tuning the layouts Previous: changelog   Contents

rules

This file is a Makefile used to build the source program and the DEB package. It actually calls the Makefile provided by the developer. For instance, the target clean will actually call make distclean

Figure 10: Invocation of debian/rules clean.
Image DEB-rulesclean

One purpose of this file is to install the program under the package build directories. For instance, documentation should be installed under usr/share/doc/package in package build directories. When installing the package, dpkg will simply open the archive and move the files in the host directories.

Figure 11: Invocation of debian/rules install.
Image DEB-rulesinstall

After installed the files in a local tree structure and fixed the permissions, md5 checksums are generated for all the files and moved under DEBIAN , along with the control file. The last step is the macro dh_builddeb which calls dpkg-deb to create the DEB file: DEBIAN/ is dumped as control.tar.gz and the local tree structure as data.tar.gz .


next up previous contents
Next: Building the package Up: Tuning the layouts Previous: changelog   Contents
Pierre Alexandre Meyer 2007-12-12