#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow

%:
	dh $@ --with apache2,autoreconf

override_dh_auto_configure:
	dh_auto_configure --sourcedirectory=tools -- \
		--with-apr=/usr/bin \
		--with-apr-util=/usr/bin \
		--with-pcre=/usr/bin \
		--with-png=/usr/bin \
		--with-ssl=/usr/lib

override_dh_auto_build:
	LTFLAGS="--no-silent" apxs2 \
		  -S CFLAGS="$(CFLAGS) \
		  -D_LARGEFILE64_SOURCE $(CPPFLAGS)" \
		  -lcrypto -DHAVE_OPENSSL -c apache2/mod_qos.c
	dh_auto_build --sourcedirectory=tools

override_dh_auto_clean:
	dh_auto_clean --sourcedirectory=tools
	dh_clean apache2/.libs/* apache2/mod_qos.*l* apache2/mod_qos.o
	rm -rf apache2/.libs/

