As I always struggle with creating a debian so I decided to write the few steps down. Finally. This is more a kind of cheat sheet than a comprehensive guide.
In my example I will package
a very fast http/2 static file server capable to run as reverse proxy.
This is my environment:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Codename: trusty 1. creating the basic structure
clone repository and change to newly created branch
create the debian structure as directory $ git clone email@example.com:lkwg82/h2o.git
$ git checkout tags/v1.1.1
$ git branch debian
$ git checkout debian
$ git branch --track origin/master debian/.
$ export DEBEMAIL =firstname.lastname@example.org
$ export DEBFULLNAME = "Lars K.W. Gohlke"
$ dh_make --single -p h2o-server_1.1.1 --createorig -y
DEBEMAIL and DEBFULLNAME should be the same as in your gpg keys, which you are using to sign the package.
Now fill the generated files under
debian/ (control/changelog) and check with lintian until there are no more errors. Commit all changes!
Too late to run INIT block at /usr/local/lib/perl/5.18.2/Net/DNS.pm line 213.
W: h2o-server source: native-package-with-dash-version
W: h2o-server source: package-needs-versioned-debhelper-build-depends 9
W: h2o-server source: vcs-field-uses-unknown-uri-format vcs-git email@example.com:h2o/h2o.git
W: h2o-server source: syntax-error-in-dep5-copyright line 11: Continuation line outside a paragraph (maybe line 10 should be " ." ).
W: h2o-server source: out-of-date-standards-version 3.9.4 (current is 3.9.5 )
W: h2o-server source: debian-watch-file-in-native-package
about preparation for publishing
I publish my packages on
launchpad. For this I recommend to make sure every needed build dependency is met.
I struggled with
pbuilder so I chose docker to have a clean build environment. For this I wrote docker-debian-build-env.
A single command runs a clean ubuntu instance and build everything:
If you struggle with both ... loop until no errors left.
Finish your (initial) changes with these steps:
Build a binary package:
or build a source package for publishing on launchpad:
$ dpkg-buildpackage -tc -B
In both cases the result is in the parent directory.
$ git-dch --release --git-author --commit --id-length =10 --distribution =trusty --debian-branch =debian
$ git-buildpackage -S -sa --git-tag --git-sign-tags --git-no-create-orig --git-debian-branch =debian 3. Publish!
Share your package with the community. Make a pull request to the original authors and let everyone know you packaged that software for easy use (hopfully).
$ dput ppa:lkwg82/webperformance ../h2o-server_1.1.1-2_source.changes
My result is here
Feedback is welcome!