#!/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/buildflags.mk

%:
	dh $@ --with varnishabi

override_dh_autoreconf:
	VARNISHAPI_DATAROOTDIR=$(shell pkg-config --variable=datadir varnishapi) dh_autoreconf

override_dh_auto_install:
	dh_auto_install
	# Empty dependency_libs field in .la files (c.f. Policy 10.2).
	sed -i "/dependency_libs/ s/'.*'/''/" `find $(installdir) -name '*.la'`
	rm -rf debian/varnish-re2/usr/share/doc/vmod-re2/

override_dh_auto_configure:
	dh_auto_configure -- --disable-tls
