This is a quick Debian package creation HOWTO for Debian newbies (i.e. me). This is trying to mirror the same kind of process that I use for creating Fedora/RHEL RPMs and is for private packages, so I ignore all of the requiments for changing the upstream software to meet the Debian projects requirements (such as correctly specifying the copyright).
sudo apt-get install -y pbuilder devscripts
mkdir pkg
cd pkg
wget http://example.com/foo-1.2.3.tar.gz
tar zxf foo-1.2.3.tar.gz
cd foo-1.2.3
DEBFULLNAME=“Jonathan Barber” dh_make -p foo_1.2.3 -f ../foo-1.2.3.tar.gz -s -e jbarber@sp.up.pt -c bsd
export QUILT_PATCHES=debian/patches
quilt new makefile.def
quilt add Makefile.def
cat <<‘EOF’ > Makefile.def
…
EOF
quilt refresh
quilt header -e
quilt new install.patch
quilt add Makefile
cat <<‘EOF’ > Makefile
…
EOF
quilt refresh
quilt header -e
quilt pop
cat <<‘EOF’ > Makefile.def
…
EOF
quilt refresh
quilt push
dpkg-buildpackage -S
pbuilder —create —distribution stable
(cd ..; pbuilder —build *.dsc)
dpkg-buildpackage -S
(cd ..; pbuilder —build *.dsc)
Outstanding issues are discovering how to build the source package without having all of the Build-Reqs installed. But I don’t know if this is possible…
Further documentation is available at: