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 h2o a very fast http/2 static file server capable to run as reverse proxy.
This is my environment:
1. creating the basic structure
clone repository and change to newly created branch
create the debian structure as directory debian/.
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!
about preparation for publishing
I publish my packages on launchpad. For this I recommend to make sure every needed build dependency is met.
A single command runs a clean ubuntu instance and build everything:
If you struggle with both ... loop until no errors left.
2. Finish
Finish your (initial) changes with these steps:
Build a binary package:
or build a source package for publishing on launchpad:
In both cases the result is in the parent directory.
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).