X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/5b078c11a05739c5869a6fff858019a7c520ca83..946d18b62315f50d6ce4e091f5ccfc37d9b050c9:/debian/rules diff --git a/debian/rules b/debian/rules index 90210a9..f7796aa 100755 --- a/debian/rules +++ b/debian/rules @@ -38,8 +38,9 @@ endef ## Override the build actions, and perform the relevant action for each ## flavour in turn. -$(foreach t, $(DH_BUILD_OVERRIDES), override_dh_auto_$t):: \ - override_dh_auto_%: +$(foreach t, $(DH_BUILD_OVERRIDES), dh-$t-hook):: %:; @: +$(foreach t, $(DH_BUILD_OVERRIDES), override_dh_auto_$t): \ + override_dh_auto_%: dh-%-hook $(foreach f, $(FLAVOURS), $(call flavour-build-action,$*,$f)) ## Configuration options. @@ -48,7 +49,7 @@ DH_configure_OPTIONS_noadns = --without-adns DH_configure_OPTIONS_adns = --with-adns ## Cleaning options. -override_dh_auto_clean:: +dh-clean-hook:: rm -rf debian/tmp-adns ## Installation options. @@ -57,6 +58,17 @@ DH_install_OPTIONS_adns = --destdir=debian/tmp-adns ###-------------------------------------------------------------------------- ### Additional tweaks. +## Some of the install lists need to be generated. This is a little +## annoying. +GEN_INSTALL_PKGS = mlib2-adns +GEN_INSTALL_FILES = $(foreach p, $(GEN_INSTALL_PKGS), debian/$p.install) +$(GEN_INSTALL_FILES): debian/%.install: \ + debian/%.install.in debian/changelog debian/rules + sed 's,@ARCH@,$a,g' $< >$@.new && mv $@.new $@ +dh-install-hook:: $(GEN_INSTALL_FILES); @: +dh-clean-hook:: + rm -f $(GEN_INSTALL_FILES) + ## Override the shared-library dependency information to allow any flavour. override_dh_makeshlibs: dh_makeshlibs -V"mlib2 (>= $v) | mlib2-adns (>= $v)"