We should now be ready to build the package.
Enter the program's main directory and then issue this command:
dpkg-buildpackage -rfakeroot
This will do everything for you. It will:
fakeroot
fakeroot
gnupg
dpkg-genchanges
and gnupg
The only input that will be required of you is your GPG key secret pass phrase, twice.
After all this is done, you will see the following files in the directory above (~/debian/):
This is the original source code tarball, merely renamed to the above so that
it adheres to the Debian standard. Note that this was created using the `-f'
option to dh_make
when we initially ran it.
This is a summary of the contents of the source code. The file is generated
from your `control' file, and is used when unpacking the source with
dpkg-source(1)
. This file is PGP signed, so that people can be
sure that it's really yours.
This compressed file contains each and every addition you made to the original
source code, in the form known as "unified diff". It is made and
used by dpkg-source(1)
. Warning: if you don't name the original
tarball packagename_version.orig.tar.gz, dpkg-source
will fail to
generate the .diff.gz file properly!
If someone else wants to re-create your package from scratch, they can easily do so using the above three files. The extraction procedure is trivial: just copy the three files somewhere else and run dpkg-source -x gentoo_0.9.12-1.dsc.
This is your completed binary package. You can use dpkg
to
install and remove this just like any other package.
This file describes all the changes made in the current package revision, and it is used by the Debian FTP archive maintenance programs to install the binary and source packages in it. It is partly generated from the `changelog' file and the .dsc file. This file is PGP signed, so that people can be sure that it's really yours.
As you keep working on the package, behavior will change and new features will be added. People downloading your package can look at this file and quickly see what has changed. Debian archive maintenance programs will also post the contents of this file to the debian-devel-changes mailing list.
The long strings of numbers in the .dsc and .changes files are MD5 checksums
for the files mentioned. A person downloading your files can test them with
md5sum(1)
and if the numbers don't match, they'll know the file is
corrupt or has been tampered with.
With a large package, you may not want to rebuild from scratch every time while
you tune a detail in debian/rules
. For testing purposes, you can
make a .deb file without rebuilding the upstream sources like this:
fakeroot debian/rules binary
Once you are finished with your tuning, remember to rebuild following the above, proper procedure. You may not be able to upload correctly if you try to upload .deb files built this way.
Debian New Maintainers' Guide
version 1.2, 6 April 2002.joy-mg@debian.org