CDBS
emdebian-toolsinstalls a replacement makefile forCDBS-/usr/share/emdebian-tools/emdebhelper.mkand patchesdebian/rulesto use that instead of/usr/share/cdbs/1/rules/debhelper.mk. The emdebian makefile simply omits calls todh_installmanand other debhelper routines that would install unwanted elements into architecture-dependent binaries.debian/controlis also patched to remove udeb and doc packages andCDBSthen omits all rules intended for such packages. Overall, CDBS packages are by far the easiest packages to cross-build for Emdebian.
debhelper
emdebian-toolscreates a patch to remove all relevant dh-* rules fromdebian/rulesin order to omit documentation.debian/rulesneeds to be checked and often edited to then remove manual dpkg or install commands that are not removed by the patch.debian/controlis also patched to remove udeb and doc packages butdebian/rulesmay need some manual changes to prevent errors when these packages are removed. Some debhelper programs do not include support for a cross-compiler indebian/rulesand this needs to be added manually. Some debhelper packages also specifically call cc instead of ${CC} indebian/rulesand this needs to be modified. All modifications todebian/rulesare managed byemdebian-toolsby updating the patch each time a build is started.
dpkg and other methods
emdebian-toolsdoes not patchdebian/rulesif neither CDBS nor debhelper are used.debian/rulesneeds 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/controlis patched to remove udeb and doc packages. All modifications todebian/rulesare managed byemdebian-toolsby updating the patch each time a build is started.