#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- patch all

override_dh_auto_install:
	$(MAKE) \
	    ROOT_DIR=$(CURDIR)/debian/`dh_listpackages` \
	    MAN8_DIR=$(CURDIR)/debian/`dh_listpackages`/usr/share/man/man8/ \
	    install
	rm -rf $(CURDIR)/debian/`dh_listpackages`/usr/doc
	rm -f $(CURDIR)/debian/`dh_listpackages`/etc/fake/instance_config/*
