#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

NO_MAKE_CHECK_ARCHS := hppa mips mipsel powerpc ppc64 ppc64el s390x

%:
	dh $@ --with autoreconf

# Enable the test suite only for architectures where it is reliable
override_dh_auto_test:
ifeq (,$(filter $(DEB_BUILD_ARCH),$(NO_MAKE_CHECK_ARCHS)))
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	find tests -name \*.sh -exec chmod +x {} \;
	dh_auto_test
endif
endif
