#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=-format
export DEB_BUILD_HARDENING_FORMAT=0


# This has to be exported to make some magic below work.
export DH_OPTIONS

%:
	dh $@ 

override_dh_clean:
	dh_clean
	rm -f debian/knxd.install

override_dh_auto_configure: configure
	dh_auto_configure -- --enable-usb --enable-eibnetip --enable-eibnetiptunnel --enable-eibnetipserver --enable-groupcache --enable-ft12 --enable-pei16s --enable-ncn5120 --enable-tpuarts --enable-dummy

configure: configure.ac debian/knxd.install
	sh bootstrap.sh

debian/knxd.install: debian/knxd.install.in
	cp $^ $@
	grep -qs 'HAVE_SYSTEMD_TRUE.*#' config.status || cat $@.systemd >> $@
