#!/usr/bin/make -f

client = conserver-client
clientd = debian/$(client)
server = conserver-server
serverd = debian/$(server)

%:
	dh $@

override_dh_auto_configure:
	cp -f /usr/share/misc/config.sub config.sub
	cp -f /usr/share/misc/config.guess config.guess

	dh_auto_configure -- \
		--verbose \
		--sysconfdir=/etc/conserver \
		--with-openssl \
		--with-pam \
		--with-port=782 \
		--with-logfile=/var/log/conserver/server.log \
		--with-pidfile=/run/conserver/conserver.pid \
		--with-libwrap \
		--with-ipv6 \
		--with-gssapi \
		--with-freeipmi

override_dh_auto_install:
	dh_auto_install -- INSTALL_PROGRAM='install --strip-program=true'

override_dh_installman:
	dh_installman --language=C

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

override_dh_installinit:
	dh_installinit --no-enable --no-start

override_dh_auto_test:
	# Make testsuite failures non-fatal fow now, they don't work
	# on IPv6-only buildds, see Bug#952740 for a technical description
	# and Bug#1019233 for this instance
	dh_auto_test -a || head test/*.diff

