mozilla-services/heka — pull request #1085 by mikn (2014-09-21 08:49:36+00:00)
Title: (slightly) Improving deb packaging with init scripts and user creation

As mentioned in PR: #791 there was some wishes for upstart and systemd jobs as well as an init script and there was also concerns that the install([...]) used in the PR would actually have included the files in all packaging.
I've added in a CMake module that I found here: https://github.com/sebknzl/cmake-debhelper/ which is licensed under GPL (might be of concern? But it is only for the build system, so it should not go viral over the entire code base)
This module is "needed" to execute dh_* scripts during the setup of the project - those in turn are needed to be able to use the debian packaging idioms of putting the init scripts into a debian/ folder.

Though, in the long run I would really recommend going away from having CPack do the Debian packaging.
I didn't do that now since it would've involved rearranging a significant portion of the build, but if it is something you want to do with the project I think I could summon the time to do that too. :)