📦 debpack
Super simple Debian packages.
Aims to keep Lintian happy and adhere to the Debian Policy Manual where reasonable, without bogging you down with needless ceremony.
Installation
curl -Lo /usr/local/bin/debpack https://raw.githubusercontent.com/hoffa/debpack/master/debpack
chmod +x /usr/local/bin/debpackYou'll also need dpkg-dev:
apt-get install dpkg-devOr, if you want to build on macOS:
brew install dpkg fakerootUsage
debpackPackage control file fields can be easily modified at build-time:
debpack Version:1.2.3You can also use the hoffa/debpack Docker image.
Example
First, let's create a program called hello that outputs world:
echo 'echo world' > hello
chmod +x helloThe package will need some metadata. Debian packages keep their metadata in a package control file, located in debian/control:
mkdir debian
cat > debian/control << EOF
Package: hello
Description: writes world to stdout
Maintainer: Jane Doe <jane@doe.com>
Architecture: all
Version: 1.0.0
EOFNote: you can also add maintainer scripts (such as
postinst, which will execute after installation) to thedebiandirectory.
We then create a Debpackfile that specifies where to copy the files when installing the package:
echo -e 'hello\t/usr/bin/' > DebpackfileFinally, build the package:
debpackDebpackfile format
- Each line has a source and destination path, separated by a tab character
- Wildcards are allowed in the source path
- Lines that start with
#are ignored - Empty lines are ignored