#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with apache2,autoreconf

override_dh_auto_configure:
	if [ "$(DEB_HOST_ARCH_OS)" = "linux" ]; then \
		dh_auto_configure -- TEST_LOCK_WAIT=600 \
			TEST_QUERY_TIMEOUT=300 \
			--with-apxs=/usr/bin/apxs2 --enable-msva; \
	else \
		dh_auto_configure -- --with-apxs=/usr/bin/apxs2; \
	fi

override_dh_auto_test:
	if ! VERBOSE=1 dh_auto_test; then     \
	  for i in test/logs/*.error.log; do  \
	    echo $$i; cat $$i; echo ======= ; \
          done; false;                        \
	fi

override_dh_auto_install:

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG
