Package: debhelper Version: 9.20160814 It would be useful to have dh $@ --with-indep ADDON, an analogue of dh $@ --with ADDON that only loads the addon when Architecture: all packages are being built.
See https://bugs.debian.org/818115 for the full background, but the summary is that the multiarch interpreter problem prevents python-sphinx from satisfying build dependencies for cross builds, so it must used only for building Architecture: all packages and pulled in through Build-Depends-Indep: python-sphinx. That means the sphinxdoc sequence addon cannot be used as dh $@ --with sphinxdoc, unless Debhelper::Sequence::sphinxdoc is pulled in separately through Build-Depends-Indep: python-sphinx Build-Depends: sphinx-common or the rules file goes through other contortions such as %-arch: dh $@ %: dh $@ --with sphinxdoc Because of this complexity, the doxygen maintainer has been reluctant to provide a corresponding doxygen sequence addon, and instead requires dh_doxygen to be called in an override target for specific packages (https://bugs.debian.org/799543). If we could write %: dh $@ --with-indep sphinxdoc such that dh_sphinxdoc -i is called after dh_installdocs when Architecture: all packages are built, and Debhelper::Sequence::sphinxdoc is not loaded when they are not, the complexity would be alleviated. Anders