#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

#export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -SDate | date -f- +%s)
#CPPFLAGS += -DSOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)
CPPFLAGS += -DPACKAGE_NO_BUILD_DATE

# these options are also passed through $DH_INTERNAL_OPTIONS in
# the overrides
%:
	dh $@ --parallel --buildsystem=autoconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-lua \
		--with-openssl \
		--with-gnutls \
		--with-kerberos5 \
		--with-zlib \
		--with-bzip2 \
		--with-sni \
		--with-libunwind \
		--includedir=/usr/include/lighttpd-2.0.0

override_dh_clean:
	dh_clean
	find . -name '*.pyc' -delete
