#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	$(RM) --verbose $(TMP)/usr/bin/pmath
	rmdir --ignore-fail-on-non-empty --parents --verbose \
		$(TMP)/usr/bin
	$(RM) --verbose $(TMP)/usr/share/man/man1/pmath.1p
	rmdir --ignore-fail-on-non-empty --parents --verbose \
		$(TMP)/usr/share/man/man1
