Rules for tools (host packages)
- Debian package sources should never be changed.
All emdebian changes should be separated from debian sources in patches
- dpatch is recommended tool for use
- Patches should have .emdebianN suffix, where N - emdebian revison number
Rules for target packages
- Debian package sources should never be changed.
- All emdebian changes should be separated from debian sources in patches. Patches to debian/rules should not appear in debian/patches but instead be held in emdebian SVN.
- It should be always possible to build both debian and emdebian packages by applying or reversing emdebian patches
- dpatch is recommended tool for use unless the upstream package uses CDBS.
- The emdebian-tools should be used as wrappers for packaging
- .embedN suffix should be added to debian revision of the package, where N - emdebian revison number
Using DEB_BUILD_OPTIONS
Due to maintainence headache, it is preferrable to avoid emdebian/ directory, and instead wrap change in DEB_BUILD_OPTIONS. Debian already has defined in policy "nostrip" and "noopt" options, we define a few more. If these get used widely, chances are they will be ratified in policy
- nocheck. Don't run testsuite, useful for crosscompilations and bootstrapping
- nodocs. Skip building docs, breaks build dependency loops so helps bootstrapping
Usage:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) LANG=C make check endif
Similar functionality should also be available in CDBS by using the emdebhelper.mk rules from emdebian-tools instead of debhelper.mk from CDBS.
A more controversial issue is handling bootstrap builds. For example libselinux creates a python bindings package, which can't be built until pythin is built. Otoh python can't be built before libselinux..
Building host packages
svn-buildpackage is recommended tool to use for building packages:
svn-buildpackage --svn-tag -rfakeroot -uc -us -sa -D
--svn-tag makes entry in tags/ directory. It's better to use it for each new revision of the package.
Building target packages
The emdebian-tools package will contain the recommended tools to build target packages.