Chapter 2. First steps

Table of Contents

2.1. Debian package building workflow
2.2. Choose your program
2.3. Get the program, and try it out
2.4. Simple build systems
2.5. Popular portable build systems
2.6. Package name and version
2.7. Setting up dh_make
2.8. Initial non-native Debian package
2.9. Initial native Debian package

Let's start by creating a package of your own (or, even better, adopting an existing one).

If you are making a Debian package with an upstream program, the typical workflow of Debian package building involves generating several specifically named files for each step as follows.

Please note that the character separating package and version was changed from - (hyphen) in the tarball name to _ (underscore) in the Debian package filenames.

In the file names above, replace the package part with the package name, the version part with the upstream version, the revision part with the Debian revision, and the arch part with the package architecture, as defined in the Debian Policy Manual. [5]

If instead you are making a Debian-specific package with no upstream, the typical workflow of Debian package building is simpler.

  • Create a native Debian source package in the 3.0 (native) format using a single compressed tar file in which all files are included.

    • package_version.tar.gz
    • package_version.dsc
  • Build Debian binary packages from the native Debian source package.

    • package_version_arch.deb

Each step of this outline is explained with detailed examples in later sections.

You have probably chosen the package you want to create. The first thing you need to do is check if the package is in the distribution archive already by using the following.

If the package already exists, well, install it! :-) If it happens to be orphaned (that is, if its maintainer is set to Debian QA Group),