Skip to content

Instantly share code, notes, and snippets.

@maniankara
Last active March 24, 2017 20:59
Show Gist options
  • Save maniankara/38b5fd1d3c113fe6cc14663e416f8217 to your computer and use it in GitHub Desktop.
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/
# 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