An Easy to Use Boilerplate 'debuild' Project29 Jun 2015
“dpkg-deb-boilerplate” is an easy to use boilerplate
debuild project for building debian package using Lanuchpad or other services.
Why do I need it? Isn’t
dpkg --build dirname enough?
dpkg --build dirname is good, but debian packaging policy provides a solid build system to easily install application binaries, libraries, service scripts, launchers, manuals etc. Also for automated build systems like
ubuntu launchpad or
opensuse build service you need to provide a source archive, not prebuild binaries. This boilerplate might come handy in such circumstance.
What do I need to make it working?
build-essentials which will automatically install
dpkg-dev etc. packages.
How do I make it working?
- Download the repository.
project-1.0directory and run
dpkg-buildpackage -us -uc.
- Several files including
project_1.0_amd64.debwill be built at parent directory.
So, how does it work actually?
Basically the boilerplate does
- Compile and build a demo library and executable from source, and install them to
- Debian packaging system takes the files from
builddirectory, and packs them into
Umm, can you be more specific?
src/projectcontains the source. Running
make -c src/projectbuilds
make -c src/project installcopies them to
debian/rulescreates a shadow directory tree under
debian/project, and copies files from
debian/controlis used to specify package name, architecture, dependecy, version, maintainer etc inforamtion.
postrmis used to cleanup when package is uninstalled.
postinstis used to reload library database after install (helps the command
Can I add my own init.d script, launcher icon, manual pages etc?
Yup, you surely can. Check out Debian Policy Manual and you are good to go.