#! /usr/bin/make -f
-DH_OPTIONS = -Bdebian/build
-%:; dh $@ $(DH_OPTIONS) --without autoreconf
+DH_OPTIONS = --parallel -Bdebian/build
-override_dh_auto_install:
- dh_auto_install $(addprefix -O,$(DH_OPTIONS))
- rm -f debian/cfd/usr/share/info/dir
+OVERRIDES += auto_configure
+dh_auto_configure_OPTS = --
+dh_auto_configure_OPTS += --with-imagedir=/var/lib/runlisp
+
+OVERRIDES += auto_install
+dh_auto_install_OPTS = --destdir=debian/tmp
+
+%:; dh $@ $(DH_OPTIONS)
+
+$(foreach o, $(sort $(OVERRIDES)), dh-$o-hook)::; @:
+$(foreach o, $(sort $(OVERRIDES)), override_dh_$o): override_dh_%: dh-%-hook
+ dh_$* $(addprefix -O, $(DH_OPTIONS)) $(dh_$*_OPTS)