| 1 |
#!/usr/bin/make -f |
| 2 |
include /usr/share/dpkg/pkg-info.mk |
| 3 |
export DEB_VERSION |
| 4 |
VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/+ds//' -e 's/r/\./') |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 7 |
|
| 8 |
export LD_LIBRARY_PATH = .libs |
| 9 |
|
| 10 |
include /usr/share/dpkg/architecture.mk |
| 11 |
|
| 12 |
ifeq ($(DEB_HOST_ARCH),armhf) |
| 13 |
DEB_DH_AUTO_CONFIGURE_OPTS__ENABLE_TLS := --disable-tls |
| 14 |
else |
| 15 |
DEB_DH_AUTO_CONFIGURE_OPTS__ENABLE_TLS := --enable-tls |
| 16 |
endif |
| 17 |
|
| 18 |
ifeq ($(filter $(DEB_HOST_ARCH_CPU),amd64 i386),) |
| 19 |
DEB_DH_AUTO_CONFIGURE_POPCNT = --disable-popcnt |
| 20 |
else |
| 21 |
DEB_DH_AUTO_CONFIGURE_POPCNT = --enable-runtime-popcnt |
| 22 |
endif |
| 23 |
|
| 24 |
export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/cliquer |
| 25 |
|
| 26 |
default: |
| 27 |
@uscan --no-conf --dehs --report || true |
| 28 |
|
| 29 |
%: |
| 30 |
dh $@ |
| 31 |
|
| 32 |
override_dh_auto_configure-arch: |
| 33 |
dh_auto_configure -- \ |
| 34 |
--enable-clz \ |
| 35 |
$(DEB_DH_AUTO_CONFIGURE_OPTS__ENABLE_TLS) \ |
| 36 |
--disable-ansicontrols \ |
| 37 |
--enable-generic \ |
| 38 |
$(DEB_DH_AUTO_CONFIGURE_POPCNT) \ |
| 39 |
--includedir=/usr/include/nauty |
| 40 |
|
| 41 |
override_dh_auto_configure-indep: |
| 42 |
@true |
| 43 |
|
| 44 |
override_dh_auto_build-indep: |
| 45 |
@true |
| 46 |
|
| 47 |
execute_before_dh_auto_test-arch: |
| 48 |
chmod +x runalltests |
| 49 |
|
| 50 |
execute_after_dh_auto_test-arch: |
| 51 |
chmod -x runalltests |
| 52 |
|
| 53 |
override_dh_auto_test-indep: |
| 54 |
@true |
| 55 |
|
| 56 |
override_dh_auto_install-indep: |
| 57 |
@true |
| 58 |
|
| 59 |
# rename gtools |
| 60 |
execute_before_dh_install-arch: |
| 61 |
cd debian/tmp/usr/bin && \ |
| 62 |
for gtool in *; \ |
| 63 |
do if test "$$gtool" != dreadnaut; then \ |
| 64 |
mv "$$gtool" "nauty-$$gtool"; \ |
| 65 |
fi; \ |
| 66 |
done |
| 67 |
|
| 68 |
# the 128-bit integer libraries may or may not be built, so only |
| 69 |
# install them if they are |
| 70 |
execute_after_dh_install-arch: |
| 71 |
if [ -e debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnautyQ.so ]; \ |
| 72 |
then dh_install -plibnauty-dev usr/lib/*/libnautyQ.so; \ |
| 73 |
fi |
| 74 |
if [ -e debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnautyQ1.so ]; \ |
| 75 |
then dh_install -plibnauty-dev usr/lib/*/libnautyQ1.so; \ |
| 76 |
fi |
| 77 |
|
| 78 |
|
| 79 |
override_dh_installdocs: |
| 80 |
dh_installdocs -plibnauty-dev --link-doc=libnauty-$(VERSION) |
| 81 |
dh_installdocs --remaining-packages |
| 82 |
|
| 83 |
override_dh_installchangelogs: |
| 84 |
dh_installchangelogs --keep changes24-29.txt |
| 85 |
|
| 86 |
execute_before_dh_installman-arch: |
| 87 |
mkdir -p debian/tmp/usr/share/man/man1 |
| 88 |
cd debian/tmp/usr/bin && \ |
| 89 |
for gtool in *; \ |
| 90 |
do help2man -N -o ../share/man/man1/$$gtool.1 \ |
| 91 |
--version-string=$(VERSION) --no-discard-stderr \ |
| 92 |
-n "graph-processing utility from the nauty suite" \ |
| 93 |
./$$gtool; \ |
| 94 |
done |
| 95 |
|
| 96 |
override_dh_compress-indep: |
| 97 |
dh_compress -X.pdf -Xexamples |