Chapter 4. Source packages
targets must be invoked as root.
This must undo any effects that the
targets may have had, except
that it should leave alone any output files created in the parent directory by a run of a
file is touched at the end of the
target, as suggested above, it should be
removed as the first action that
performs, so that running
again after an
doesn't think that everything is already done.
target may need to be invoked as root if
has been invoked since the
, or if
has been invoked as root (since
may create directories, for
get orig source
(optional) This target fetches the most recent version of the original
source package from a canonical archive site (via FTP or WWW, for example), does any
necessary rearrangement to turn it into the original source tar file format described below,
and leaves it in the current directory.
This target may be invoked in any directory, and should take care to clean up any tem
porary files it may have left.
This target is optional, but providing it if possible is a good idea.
targets must be invoked with the current directory being the
package's top level directory.
Additional targets may exist in
, either as published or undocumented inter
faces or for the package's internal use.
The architectures we build on and build for are determined by
variables using the utility
. You can determine the Debian architecture and the GNU style archi
tecture specification string for the build machine (the machine type we are building on) as well
as for the host machine (the machine type we are building for). Here is a list of supported
(the Debian architecture)
(the GNU style architecture specification string)
(the CPU part of
(the System part of
for specification of the build machine or
for specification of the
Backward compatibility can be provided in the rules file by setting the needed variables to
suitable default values; please refer to the documentation of
It is important to understand that the
string only determines which Debian archi
tecture we are building on or for. It should not be used to get the CPU or system information;
the GNU style variables should be used for that.
package often allows one to build a package correctly even without being root.