#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ #--without autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
	    --with-docdir=/usr/share/doc/gnarwl \
	    --with-homedir=/var/lib/gnarwl

# Explicitly pass CFLAGS to make, they are not picked up from the env
# - enables hardening buildflags
override_dh_auto_build:
	make CFLAGS="$(CFLAGS) -I.. -fcommon"

override_dh_auto_install:
	dh_auto_install -- GZIP="-9n"
	rm $(CURDIR)/debian/gnarwl/usr/share/doc/gnarwl/INSTALL
	rm $(CURDIR)/debian/gnarwl/usr/share/doc/gnarwl/LICENSE
	rm $(CURDIR)/debian/gnarwl/usr/share/doc/gnarwl/HISTORY.gz
