-export DH_COMPAT = 4
-
-build:
- rm -rf build deb-build
- mkdir deb-build
- cd deb-build; ../configure --prefix=/usr --mandir=/usr/share/man
- make -C deb-build
- make -C deb-build check
- touch build
-
-clean:
- dh_clean
- rm -rf deb-build build
-
-install: build
- dh_clean
- make -C deb-build install DESTDIR=`pwd`/debian/catacomb2
- mkdir -p debian/catacomb-dev/usr
- mv debian/catacomb2/usr/include debian/catacomb-dev/usr
- mkdir -p debian/catacomb-dev/usr/lib
- mv debian/catacomb2/usr/lib/catacomb debian/catacomb-dev/usr/lib
- mv debian/catacomb2/usr/lib/pkgconfig debian/catacomb-dev/usr/lib
- mv debian/catacomb2/usr/lib/*.a debian/catacomb-dev/usr/lib
- mv debian/catacomb2/usr/lib/*.so debian/catacomb-dev/usr/lib
- mv debian/catacomb2/usr/lib/*.la debian/catacomb-dev/usr/lib
- mkdir -p debian/catacomb-bin/usr
- mv debian/catacomb2/usr/bin debian/catacomb-bin/usr
- mkdir -p debian/catacomb-bin/usr/share/man
- mv debian/catacomb2/usr/share/man/man1 \
- debian/catacomb-bin/usr/share/man
-
-binary-indep:
-
-binary-arch: install
- dh_testdir -a
- dh_testroot -a
- dh_compress -a
- dh_installdocs -a
- dh_strip -a
- dh_makeshlibs -a -V
- dh_undocumented -a
- dh_shlibdeps -a
- dh_installdebconf -a
- dh_gencontrol -a
- dh_fixperms -a
- dh_installdeb -a
- dh_md5sums -a
- dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-source:
- rm -rf deb-build/*.tar.gz deb-build/=deb=
- make -C deb-build dist
- mkdir deb-build/=deb=
- cd deb-build/=deb=; tar xvfz ../*.tar.gz
- d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
- rm -rf deb-build/=deb=
-
-.PHONY: binary binary-arch binary-indep clean install source
+## Test both with and without CPU-specific optimizations.
+override_dh_auto_test:
+ dh_auto_test $(DH_OPTIONS)
+ CATACOMB_CPUFEAT="-*" dh_auto_test $(DH_OPTIONS)