How each packaging method is handled

CDBS

emdebian-tools installs a replacement makefile for CDBS - /usr/share/emdebian-tools/emdebhelper.mk and patches debian/rules to use that instead of /usr/share/cdbs/1/rules/debhelper.mk. The emdebian makefile simply omits calls to dh_installman and other debhelper routines that would install unwanted elements into architecture-dependent binaries. debian/control is also patched to remove udeb and doc packages and CDBS then omits all rules intended for such packages. Overall, CDBS packages are by far the easiest packages to cross-build for Emdebian.

debhelper

emdebian-tools creates a patch to remove all relevant dh-* rules from debian/rules in order to omit documentation. debian/rules needs to be checked and often edited to then remove manual dpkg or install commands that are not removed by the patch. debian/control is also patched to remove udeb and doc packages but debian/rules may need some manual changes to prevent errors when these packages are removed. Some debhelper programs do not include support for a cross-compiler in debian/rules and this needs to be added manually. Some debhelper packages also specifically call cc instead of ${CC} in debian/rules and this needs to be modified. All modifications to debian/rules are managed by emdebian-tools by updating the patch each time a build is started.

dpkg and other methods

emdebian-tools does not patch debian/rules if neither CDBS nor debhelper are used. debian/rules needs to be edited by hand to remove all manpages, infopages, changelogs, licences, copyright files, examples, documentation, README, NEWS, TODO and any other unwanted files. debian/control is patched to remove udeb and doc packages. All modifications to debian/rules are managed by emdebian-tools by updating the patch each time a build is started.