Personal tools
You are here: Home Docs Help! Reference Manuals Debian Reference Debian fundamentals The Debian package management system Building binary packages from a source package

2.2.13. Building binary packages from a source package

Up one level

-

For a package foo, you will need all of foo_*.dsc, foo_*.tar.gz, and 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, the command

     $ dpkg-source -x foo_version-revision.dsc

will extract the package into a directory called foo-version.

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

Then,

     # 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.

(no ads!)