#!/usr/bin/make -f
export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_clean:

	rm -f debian/topfd.1
	rm -f debian/toppic.1
	rm -f debian/topmg.1
	rm -f debian/topdiff.1

	dh_clean


override_dh_auto_configure:

	rst2man debian/topfd.1.rst > debian/topfd.1
	rst2man debian/toppic.1.rst > debian/toppic.1
	rst2man debian/topmg.1.rst > debian/topmg.1
	rst2man debian/topdiff.1.rst > debian/topdiff.1

	dh_auto_configure -- \
		-DCMAKE_INSTALL_PREFIX="/usr" \
		-DCMAKE_BUILD_TYPE=release

