#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# Used for man pages.
VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
		| cut -d- -f1)

%:
	dh $@

override_dh_auto_build:
	mkdir -p usr/share/man/man8
	for script in `ls usr/sbin` ; do \
	    echo "creating man file for $${script}"; \
	    pod2man --release=$(VERSION) --section 8 \
		--center="System Management Commands" \
		usr/sbin/$${script} > usr/share/man/man8/$${script}.8 ; \
	done
