#!/usr/bin/make -f

export DH_VERBOSE=1
export AUTOHEADER=true

options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
	  INSTALL_USER=root INSTALL_GROUP=root ;

%:
	dh $@

override_dh_auto_configure:
	@echo "== dpkg-buildpackage: configure" 1>&2
	dh_update_autotools_config
	$(options) $(MAKE) include/config.h LOCAL_CONFIGURE_OPTIONS='--exec-prefix=/nondefault --sbindir=/usr/sbin'
	touch .gitcensus

override_dh_auto_build:
	@echo "== dpkg-buildpackage: build" 1>&2
	dh_auto_build -- V=1 default

override_dh_clean:
	@echo "== dpkg-buildpackage: clean" 1>&2
	-rm -f debian/*substvars debian/files* debian/*.debhelper
	rm -f .gitcensus
	dh_clean
