#!/usr/bin/make -f

# export DH_VERBOSE=1

# enable bindnow
# https://wiki.debian.org/HardeningWalkthrough
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh "$@"

override_dh_auto_configure:
#	test -d build-aux || mkdir build-aux
	perl md2txt.pl -l 4 README.md > README
# for reproducible builds (pound.info includes the mtime of pound.texi)
	touch --no-dereference --date='@$(SOURCE_DATE_EPOCH)' doc/pound.texi
	dh_auto_configure -- --enable-dns-tests

override_dh_installinit:
	dh_installinit --no-enable

override_dh_installsystemd:
	dh_installsystemd --no-enable
