Last active
June 7, 2022 10:50
-
-
Save RichardBronosky/5358867 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 |
Good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Google is littered with examples of people wanting to put symbolic links in their packages and being told that it is not possible. http://comments.gmane.org/gmane.linux.debian.devel.mentors/56819 I figured out how to do it!