2.2.13 Building binary packages from a source package
For a package foo, you will need all of
foo_*.diff.gz to compile the source (note: there is no
.diff.gz for a Debian native package).
Once you have them, if you have the
dpkg-dev package installed,
$ dpkg-source -x foo_version-revision.dsc
will extract the package into a directory called
Issue the following command to build the binary package:
$ cd foo-version
$ su -c "apt-get update ; apt-get install fakeroot"
$ dpkg-buildpackage -rfakeroot -us -uc
# su -c "dpkg -i ../foo_version-revision_arch.deb"
to install the newly built package. See Port a package to the stable
system, Section 6.4.10.