Forked from RichardBronosky/deb-packaging-example.sh
Last active
August 29, 2015 14:27
-
-
Save mullingitover/a3b96c5cdd367c6c392b to your computer and use it in GitHub Desktop.
Debian packaging is hard. I learned to create simple packages from http://faceted.wordpress.com/2011/05/18/howto-build-a-trivial-debian-package-with-dh_make/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME=hello-world | |
VERSION=0.1 | |
# Standard setup | |
mkdir $NAME-$VERSION | |
cd $NAME-$VERSION | |
dh_make --createorig --indep --copyright gpl2 --yes | |
find debian -type f -not -regex 'debian/\(changelog\|compat\|rules\|control\|copyright\)' -exec rm {} \; | |
echo "./debian/source/* ./" > debian/$NAME.install | |
# You should check the copyright file and maybe the changelog at this point. | |
# Create custom stuff | |
mkdir -p debian/source/bin | |
echo echo Hello World > debian/source/bin/hello | |
chmod +x debian/source/bin/hello | |
# There's a lot of confusion about how to add symbolic links to deb packages. This is how you do it... | |
echo bin/hello bin/helloworld > debian/$NAME.links | |
# Standard finish | |
dpkg-buildpackage -uc -tc -rfakeroot | |
# Hey look what I made! | |
dpkg --contents ../${NAME}_$VERSION*.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment