progs/perftest.c: Use from Glibc syscall numbers.
[catacomb] / debian / rules
index 8116163..3fb55de 100755 (executable)
@@ -1,61 +1,12 @@
 #! /usr/bin/make -f
+DH_OPTIONS = --parallel --without=autoreconf -Bdebian/build
+%:; dh $@ $(DH_OPTIONS)
 
-export DH_COMPAT = 4
+## Test both with and without CPU-specific optimizations.
+override_dh_auto_test:
+       dh_auto_test $(addprefix -O, $(DH_OPTIONS))
+       CATACOMB_CPUFEAT="-*" dh_auto_test $(addprefix -O, $(DH_OPTIONS))
 
-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/*.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 
+## Check that the shared-library symbols are plausible.
+override_dh_makeshlibs:
+       dh_makeshlibs -- -c4