|
103.
|
|
|
This file gives the copyright information for both the upstream source and the packaging. Ubuntu and `Debian Policy (Section 12.5) <policy-copyright_>`_ require that each package installs a verbatim copy of its copyright and license information to ``/usr/share/doc/$(package_name)/copyright``.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:127
|
|
104.
|
|
|
Generally, copyright information is found in the ``COPYING`` file in the program's source directory. This file should include such information as the names of the author and the packager, the URL from which the source came, a Copyright line with the year and copyright holder, and the text of the copyright itself. An example template would be::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:132
|
|
105.
|
|
|
This example follows the `Machine-readable debian/copyright <DEP5_>`_ format. You are encouraged to use this format as well.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:174
|
|
106.
|
|
|
The rules file
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:179
|
|
107.
|
|
|
The last file we need to look at is ``rules``. This does all the work for creating our package. It is a Makefile with targets to compile and install the application, then create the ``.deb`` file from the installed files. It also has a target to clean up all the build files so you end up with just a source package again.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:181
|
|
108.
|
|
|
Here is a simplified version of the rules file created by ``dh_make`` (which can be found in the ``dh-make`` package):
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:189
|
|
109.
|
|
|
Let us go through this file in some detail. What this does is pass every build target that ``debian/rules`` is called with as an argument to ``/usr/bin/dh``, which itself will call all the necessary ``dh_*`` commands.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:203
|
|
110.
|
|
|
``dh`` runs a sequence of debhelper commands. The supported sequences correspond to the targets of a ``debian/rules`` file: "build", "clean", "install", "binary-arch", "binary-indep", and "binary". In order to see what commands are run in each target, run::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:207
|
|
111.
|
|
|
Commands in the binary-indep sequence are passed the "-i" option to ensure they only work on binary independent packages, and commands in the binary-arch sequences are passed the "-a" option to ensure they only work on architecture dependent packages.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:216
|
|
112.
|
|
|
Each debhelper command will record when it's successfully run in ``debian/package.debhelper.log``. (Which dh_clean deletes.) So dh can tell which commands have already been run, for which packages, and skip running those commands again.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../ubuntu-packaging-guide/debian-dir-overview.rst:221
|