Monday 18 February 2013

Build Debian Source Packages

One way to build manually downloaded Debian GNU/Linux source packages assuming build requirements are met including installing build-essential, dpkg-dev, and fakeroot packages.
  1. Download the package_version-revision.dsc package_version.orig.tar.gz and package_version-revision.debian.tar.gz files.
  2. cd to the download directory and run:
    
    dpkg-source -x package_version-revision.dsc
    
  3. cd to package-version directory
  4. optionally make changes to the source code
  5. optionally increment the Debian release number of the package:
    
    export EMAIL=someemail@somedomain.com
    dch -i # from devscripts package, may also need to install libparse-debcontrol-perl
    
  6. build the package:
    
    dpkg-buildpackage -rfakeroot -us -uc
    
  7. install the package:
    
    sudo dpkg -i ../<packagename>_<version>-<revision>_<architecture>.deb