"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?
Install build-essentials
which will automatically install make
, gcc
, g++
, dpkg-dev
etc. packages.
How do I make it working?
- Download the repository.
cd
toproject-1.0
directory and rundpkg-buildpackage -us -uc
.- Several files including
project_1.0_amd64.deb
will 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
build
directory. - Debian packaging system takes the files from
build
directory, and packs them intodeb
file.
Umm, can you be more specific?
src/project
contains the source. Runningmake -c src/project
buildsproject
,project.h
andlibproject.so
. Thenmake -c src/project install
copies them tobuild
directory.debian/rules
creates a shadow directory tree underdebian/project
, and copies files frombuild
to there.debian/control
is used to specify package name, architecture, dependecy, version, maintainer etc inforamtion.postrm
is used to cleanup when package is uninstalled.postinst
is used to reload library database after install (helps the commandproject
easily findlibproject.so
.
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.
Browse the project dpkg-deb-boilerplate