#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS:=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --with-example-dir=\$${prefix}/share/doc/grap/examples

override_dh_auto_install:
	dh_auto_install
	sed -i -e "s#/usr/local/share/grap/grap.defines#/usr/share/grap/grap.defines#g;" debian/grap/usr/share/man/man1/grap.1
	sed -i -e "s#/usr/local/share/examples/grap#/usr/share/doc/grap/examples#g;" debian/grap/usr/share/man/man1/grap.1
	rm -f debian/grap/usr/share/doc/grap/COPYRIGHT
	rm -f debian/grap/usr/share/doc/grap/grap.man
