#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Fix a FTCBFS. See #871456
include /usr/share/dpkg/architecture.mk
ifeq ($(origin CC),default)
CC = $(DEB_HOST_GNU_TYPE)-gcc
endif
export CC

%:
	dh $@

# Workaround to avoid a FTBFS and an inadequate use of the runstatedir option:
# configure: error: --runstatedir=/run: invalid option
execute_before_dh_clean:
	rm -f config.cache stamp-h

# Workaround to avoid a FTBFS and an inadequate use of the runstatedir option:
# configure: error: --runstatedir=/run: invalid option
execute_before_dh_auto_clean:
	if [ -e Makefile ]; then { rm -f Makefile Makefile.in; }; fi
	if [ -e pgpgpg ]; then rm -f *.o pgpgpg config.h config.log config.status stamp-h1; fi
	dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure -- --with-gpg-path=/usr/bin/gpg
