User Tools

Site Tools


development:build:pkg-debian

Building a Debian/Ubuntu package from source

This short article describes, how to build a Debian / Ubuntu package from a source tarball (very compressed version of Ubuntu Packaging Guide). Assume for example you have downloaded the source package dfcgen-gtk-0.2.tar.gz and you are working under Ubuntu 10.04 (Lucid Lynx).

Here are the steps:

  1. Decompress dfcgen-gtk-0.2.tar.gz in a directory of your choice, e.g. in <path>/tmp:
    tar -xvfz dfcgen-gtk-0.2.tar.gz
  2. Change into directory dfcgen-gtk-0.2 and create a directory named debian:
    cd dfcgen-gtk-0.2; mkdir debian
  3. Generate a fresh set of Debian control files using the helper tool dh_make.
  4. Edit all files in directory debian to describe your package. See the Debian Policy Manual for details on syntax and semantics.1)
  5. Ensure that you have a GPG/PGP key and the seahorse-agent is running. Notice that the user name of your key must match the used name in your (edited) package description.
  6. Go into directory <path>/tmp/dfcgen-gtk-0.2 and execute
    dpkg-buildpackage -rfakeroot

    to build your Debian package.

  7. Look into <path>/tmp for your package files and be happy ;-)
1)
If the package normally is build by ./configure; make; make install, then there is no need to edit the file rules.
development/build/pkg-debian.txt · Last modified: 2022/08/29 07:26 by 127.0.0.1