Basic Debian Packaging

From FreekiWiki
Revision as of 00:46, 9 December 2005 by (talk) (a few tweaks and additional info)
Jump to navigation Jump to search

this class should give a basic understanding of how to build a debian package from some common types of source tarballs or repositories.


suggested background

  • rudimentary understanding of building and compiling software
  • basic understanding of apt and dpkg
  • basic understanding of cvs or subversion

topics covered

finding software

  • is it already packaged:
  • other sources of software:

environment variables


creating debian directory

  • using dh_make (package dh-make)
  • dh-make-perl

contents of a debian directory

  • copyright
  • changelog
    • dch
    • version
    • release
  • control
  • rules
  • other files
    • *.installi
    • *.manpages
    • *.examples
    • *.init
    • *.postinst
  • other examples: *.ex and *.EX files

cdbs basics:

  • magic snippet for a complete debian/rules file:
#!/usr/bin/make -f
# uncomment the next line if using a makefile-based source
#include /usr/share/cdbs/1/class/
include /usr/share/cdbs/1/rules/
  • add cdbs to build-depends or build-depends-indep debian/control


  • commandline arguments: -us -uc
  • basic troubleshooting
    • build dependencies
    • package dependencies
      • install in a clean debian base-install
      • pbuilder/sbuild


  • debian policy checker

additional and related topics: