chiark / gitweb /
debian/: Bump to Debhelper 10.
[mLib] / debian / rules
index 90210a98ecd4889de708f64f3f83ed6b2d6cd44d..4bd7c2c1d62f9bae455fa007bd18088691ac88ad 100755 (executable)
@@ -31,15 +31,16 @@ DH_BUILD_OVERRIDES = configure clean build install test
 ## How to perform build action for a particular library flavour.
 define flavour-build-action
 dh_auto_$1 -Bdebian/build-$2 \
-       $(DH_OPTIONS) $(DH_OPTIONS_$2) \
+       $(addprefix -O, $(DH_OPTIONS)) $(DH_OPTIONS_$2) \
        $(DH_$1_OPTIONS) $(DH_$1_OPTIONS_$2)
 
 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,8 +58,22 @@ DH_install_OPTIONS_adns = --destdir=debian/tmp-adns
 ###--------------------------------------------------------------------------
 ### Additional tweaks.
 
-## Override the shared-library dependency information to allow any flavour.
+## Don't try to rebuild our configure script.
+DH_OPTIONS += --without=autoreconf
+
+## 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)
+
+## Check that the shared-library symbols are plausible.
 override_dh_makeshlibs:
-       dh_makeshlibs -V"mlib2 (>= $v) | mlib2-adns (>= $v)"
+       dh_makeshlibs -- -c4
 
 ###----- That's all, folks --------------------------------------------------