#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-filter \
		--enable-reverse \
		--enable-upstream \
		--enable-xtinyproxy

override_dh_auto_install:
	dh_auto_install
	cp -a $(CURDIR)/debian/tinyproxy.conf $(CURDIR)/debian/tmp/etc/tinyproxy

ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
# The testsuite currently fails on kFreeBSD, apparently due to different
# behaviour of loopback network interfaces.
override_dh_auto_test:
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/env