Skip to content

Instantly share code, notes, and snippets.

Last active September 16, 2015 13:02
What would you like to do?
Perl to Debian package

Adding an existing package

For instance

$ git clone -b debian ssh://$PACKAGE.git
$ git push origin debian

To build the debian package

$ milla build
$ cp *.tar.gz ../source.tar.gz
$ git checkout debian
$ ...somehow merge changes from upstream...
$ debuild -b -uc -us

The official way is to use gbp:

debian$ git clean -fd
debian$ gbp import-orig --uscan --debian-branch=debian --upstream-branch=master --no-sign-tags
debian$ ...resolve merge conflicts

Creating a new package

For the first time, create a debian branch. This branch is called master at Debian while our master is called upstream:

$ git checkout -b debian
$ mkdir -p debuild/source

$ milla build
$ cp META.json debuild/source
$ cp *.tar.gz debuild/source.tar.gz
$ dh-make-perl --vcs none --build debuild/source --desc libmodule-build-tiny-perl
$ cp -r debuild/source/debian/ .

Manually adjust or remove debian/ files (changelog, control, c)

First check:

$ fakeroot debian/rules build

Build package:

$ debuild

Clean build artifacts:

$ debuild clean

On each update:

$ git merge master

$ dh-make-perl --vcs none --desc libmodule-build-tiny-perl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment