#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# as requested by Fabrizio Polacco (the previous man-db maintainer)
exclude_manpages += man1/apropos.1 man1/man.1 man1/whatis.1

# specific to Red Hat
exclude_manpages += man1/Anotherlevel.1

# not packaged for Debian (#290275)
exclude_manpages += man1/usleep.1

# provided by the passwd package (#330578)
exclude_manpages += man1/chfn.1 man1/chsh.1 man1/passwd.1

# provided by the login package (#330578)
exclude_manpages += man1/su.1

build:	# Nothing to do.

clean:
	dh_testdir
	dh_testroot
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	dh_install usr/man/fi usr/share/man
	cd debian/manpages-fi/usr/share/man/fi && rm -f $(exclude_manpages)

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol -- -Vcount=`find debian/manpages-fi/usr/share/man -type f | wc -l`
	dh_md5sums
	dh_builddeb

binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
