sudo apt-get install build-essential # install any prereq build tools
sudo apt-get install packaging-dev # 126 MB for stuff like: sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file
wget -O hello-2.7.tar.gz "http://ftp.gnu.org/gnu/hello/hello-2.7.tar.gz"
tar xf hello-2.7.tar.gz cd hello-2.7 ./configure make sudo make install # installs to /usr/local/bin/hello
PREREQUISITES:
sudo apt-get install dh-make
bzr whoami "John Pfeiffer john@john-pfeiffer.com" # doesn't seem to work export DEBFULLNAME="John Pfeiffer" export DEBEMAIL="john@john-pfeiffer.com"
have the source in tar.gz format and do NOT have a directory with the same name e.g. ls /tmp should list /tmp/hello-2.7.tar.gz but NOT /tmp/hello-2.7
package name, version, path to upstream tarball (assumes you are in the same directory as the tar.gz)
bzr dh-make hello 2.7 hello-2.7.tar.gz
Fetching tarball
Looking for a way to retrieve the upstream tarball
Upstream tarball already exists in build directory, using that # because this is the example hello project?
Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
[s/i/m/l/k/n]
choose s for single binary
Maintainer name : John Pfeiffer
Email-Address : john@john-pfeiffer.com
Date : Thu, 18 Jul 2013 11:43:19 -0700
Package Name : hello
Version : 2.7
License : blank
Type of Package : Single
Hit <enter> to confirm:
Skipping creating ../hello_2.7.orig.tar.gz because it already exists
Done. Please edit the files in the debian/ subdirectory now. hello
uses a configure script, so you probably don't have to edit the Makefiles.
Package prepared in /tmp/hello
$ cd hello/debian # remove optional example files $ rm ex EX
decide if you want to delete the README.source and README.Debian
vi hello/debian/changelog # modify any stuff that needs changing
cd hello bzr commit -m "Initial commit of Debian packaging."
bzr builddeb -- -us -uc ... lot of output here
cd .. ls hello_2.7-1_amd64.deb
lesspipe hello_2.7-1_amd64.deb # Verify the contents of the deb
sudo dpkg -i hello_2.7-1_amd64.deb
which hello # /usr/bin/hello
ls /usr/share/doc/hello
POST CHECK FOR BUGS
lintian hello_2.7-1.dsc lintian hello_2.7-0ubuntu1_amd64.deb