#!/usr/bin/make -f
# rules file for the efibootmgr package, requires debhelper / dh
# copyright 2012 by Bdale Garbee, GPLv2 or later

export DH_VERBOSE=1

%:
	dh $@

override_dh_installman:
	(cd src/man/man8 ; docbook-to-man efibootmgr.8.docbook > efibootmgr.8)
	dh_installman

override_dh_clean:
	rm -f src/man/man8/efibootmgr.8
	dh_clean

override_dh_install:
	# Re-add the mention of efibootmgr.8 to filelist-rpm that's
	# caused by the removal in the clean step above. filelist-rpm
	# shouldn't really be in the upstream tarball as it's
	# generated each time... :-(
	if (! grep -q efibootmgr.8 filelist-rpm) ; then echo " %attr(0444,root,root) /usr/share/man/man8/efibootmgr.8" >> filelist-rpm; fi
	dh_install
