This is what I came up with as a continuation of Vasilyβs answer. It effectively accomplishes what dh_installdeb does, but without automatically adding /etc files. Thus, you again get full control over files that are considered conffiles and which are not.
override_dh_installdeb: dh_installdeb @echo "Recreating conffiles without auto-adding /etc files" @for dir in ${CURDIR}/debian/*/DEBIAN; do \ PKG=$$(basename $$(dirname $$dir)); \ FILES=""; \ if [ -f ${CURDIR}/debian/conffiles ]; then \ FILES="${CURDIR}/debian/conffiles"; \ fi; \ if [ -f ${CURDIR}/debian/$${PKG}.conffiles ]; then \ FILES="$$FILES ${CURDIR}/debian/$${PKG}.conffiles"; \ fi; \ if [ -n "$$FILES" ]; then \ cat $$FILES | sort -u > $$dir/conffiles; \ elif [ -f $$dir/conffiles ]; then \ rm $$dir/conffiles; \ fi; \ done
(Of course, use the REAL tabs if you insert rules into your file).
This answer uses BASH (or / bin / sh, which is either symbolically associated with BASH, or is a variant of it). There may be a way to achieve this using only internal makefile commands, but I'm not so good with them.
This should work even when creating multiple binary packages from the same source, and it respects the simple debian/conffiles , as well as the package specific debian/${pkg}.conffiles .
source share