#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS=hardening=-format

%:
	dh $@ --with autoreconf --parallel

override_dh_auto_configure:
	dh_auto_configure -- --with-PSFontDir=/usr/share/fonts/type1/gsfonts

override_dh_install:
	dh_install
	@echo prevent library files in libiv1 from being duplicated in libiv-unidraw1
	find debian/libiv1/usr/lib -type f -o -type l		\
	 | sed s:^debian/libiv1/:debian/libiv-unidraw1/:	\
	 | xargs --no-run-if-empty rm --verbose

override_dh_installexamples: debian/glyphs.tar
	dh_installexamples

debian/glyphs.tar:
	tar --create --file=$@ \
	    --exclude-backups --exclude='*.bak' \
	    --exclude=Makefile.depend --exclude='*.o' --exclude=a.out \
	    --directory=src glyphs
