#! /usr/bin/make -f
-CDBS = /usr/share/cdbs/1
+DH_OPTIONS = --parallel --builddir=debian/build
+%:; dh $@ $(DH_OPTIONS)
-include $(CDBS)/class/autotools.mk
-include $(CDBS)/rules/debhelper.mk
-
-###--------------------------------------------------------------------------
-### General settings.
-
-DEB_BUILDDIR = $(CURDIR)/build
-
-###--------------------------------------------------------------------------
-### Correct configuration.
-
-DEB_CONFIGURE_EXTRA_FLAGS = \
- --with-perlmoddir=/usr/share/perl5
+override_dh_auto_configure:
+ dh_auto_configure -- --with-perlmoddir=/usr/share/perl5
###--------------------------------------------------------------------------
### Installation.
### Rather than have lots (and /lots/) of little *.install files, we just
### have one big list of everything and split it out as we go.
-clean::; rm -f debian/*.install
-
-$(addprefix install/, $(DEB_ALL_PACKAGES)):: install/%: debian/%.install
-
-debian/%.install: debian/inst
- while read file pkg dir; do \
- if [ "$$pkg" = "$*" ]; then \
- echo "debian/tmp$$dir/$$file"; \
- fi; \
- done <debian/inst >$@.new && mv $@.new $@
+override_dh_clean:
+ dh_clean
+ rm -f debian/*.install debian/*.stamp
+
+override_dh_install: debian/install-files.stamp
+ dh_install
+
+debian/install-files.stamp: debian/inst
+ rm -f debian/*.install debian/*.install.new
+ pkgs=" "; while read file pkg dir; do \
+ case "$$pkgs" in *" $$pkg "*) ;; *) pkgs="$$pkgs$$pkg ";; esac; \
+ echo "debian/tmp$$dir/$$file" >>debian/$$pkg.install.new; \
+ done <debian/inst; \
+ for pkg in $$pkgs; do \
+ mv debian/$$pkg.install.new debian/$$pkg.install; \
+ done
###----- That's all, folks --------------------------------------------------