Last active
March 24, 2017 20:59
-
-
Save maniankara/38b5fd1d3c113fe6cc14663e416f8217 to your computer and use it in GitHub Desktop.
Build a debian package for your binary (box) to install in /usr/bin/
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
# 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 <[email protected]> | |
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