#!/usr/bin/make -f

XSL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
XSLTPROC = xsltproc --nonet --param man.charmap.use.subset 0

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

.PHONY: override_dh_installdocs
override_dh_installdocs: debian/cflow.1
	dh_installdocs

debian/cflow.1:
	$(XSLTPROC) -o debian/ $(XSL) debian/manpage.xml

override_configure:
	dh_testdir
	dh_autotools-dev_updateconfig
	touch configure-stamp

.PHONY: override_dh_auto_install
override_dh_auto_install:
	dh_auto_install
	rm -f debian/cflow/usr/share/info/dir*

clean:
	dh_testdir
	dh_autotools-dev_restoreconfig
	rm -f doc/Makefile debian/cflow.debhelper.log
	dh clean

.PHONY: build build-arch build-indep binary binary-arch binary-indep clean
build build-arch build-indep binary binary-arch:
	dh $(@)
# In order not to confuse lintian, binary-indep is a separate target:
binary-indep:

# vim:ts=4 sw=4 noet
