#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=autoconf

override_dh_auto_configure:
	# Rebuild the docs to propagate procServ.txt patch
	dh_auto_configure -- --docdir=\$${prefix}/share/doc/procserv --enable-doc=yes

override_dh_auto_build:
	dh_auto_build -O--no-parallel

execute_after_dh_auto_install:
	# Remove extra ChangeLog and COPYING files installed by upstream make
	rm $(CURDIR)/debian/procserv/usr/share/doc/procserv/ChangeLog
	rm $(CURDIR)/debian/procserv/usr/share/doc/procserv/COPYING

	# Remove non-descriptive release note file
	rm $(CURDIR)/debian/procserv/usr/share/doc/procserv/NEWS
