Skip to content
📦 Super simple Debian packages
Branch: master
Clone or download
Latest commit b1b6f6c Mar 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
Dockerfile
LICENSE
README.md
debpack

README.md

📦 debpack

Build Status Docker Build Status Codacy Badge

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/debpack

You'll also need dpkg-dev:

apt-get install dpkg-dev

Or, if you want to build on macOS:

brew install dpkg fakeroot

Usage

debpack

Package control file fields can be easily modified at build-time:

debpack Version:1.2.3

You 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 hello

The 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
EOF

Note: you can also add maintainer scripts (such as postinst, which will execute after installation) to the debian directory.

We then create a Debpackfile that specifies where to copy the files when installing the package:

echo -e 'hello\t/usr/bin/' > Debpackfile

Finally, build the package:

debpack

Debpackfile 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
You can’t perform that action at this time.