Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build a debian package for your binary (box) to install in /usr/bin/
# Prepare the binary
mkdir mypackage; # root dir of the package creation
mkdir -p mypackage/usr/bin; # path to install
cp box mypackage/usr/bin # copy the binary
# Prepare the debian control
mkdir -p mypackage/DEBIAN/
cat > mypackage/DEBIAN/control << EOF
Package: myfancypackage
Version: 1.0-1
Maintainer: You <whatever@contact.address>
Architecture: amd64
Description: flies aeroplanes
Longer description here
.
As you can see, new paragraph are split by a single dot,
and lines have to be indented by one space.
EOF
# Create the package
dpkg-deb -b mypackage .
# verify the package with `less <pkg>` or `dpkg -c <pkg>`
# Need a simpler approach?
# https://github.com/jordansissel/fpm/wiki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment