#!/usr/bin/make -f
#export DH_VERBOSE=1
export DH_OPTIONS
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

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

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--datadir=\$${prefix}/share/games \
		--bindir=\$${prefix}/games \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info

override_dh_auto_install:
	mkdir -p $(CURDIR)/debian/tmp/usr/share/games/applications
	dh_auto_install 
	find $(CURDIR)/debian/tmp/ -name "*.ttf" \
		-exec rm {} \;
	find $(CURDIR)/debian/tmp/ -type d -empty -delete

override_dh_link:
	dh_link -pbriquolo-data \
		usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf \
	        usr/share/games/briquolo/data/DejaVuSans.ttf


