#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

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

override_dh_auto_build:
	jam -q

override_dh_auto_install:
	jam -sprefix=$(CURDIR)/debian/tmp/usr install

override_dh_install:
	# create a .xpm file for the Debian menu
	convert -monitor -resize 32x32 \
	  $(CURDIR)/debian/tmp/usr/share/games/pixmaps/lincity-ng.png \
	  $(CURDIR)/debian/tmp/usr/share/games/pixmaps/lincity-ng.xpm
	dh_install

	# Remove duplicate Bitstream Vera font, use links file and symlink
	# to Debian's ttf-dejavu package.
	rm -f $(CURDIR)/debian/lincity-ng-data/usr/share/games/lincity-ng/fonts/*

override_dh_installchangelogs:
	dh_installchangelogs RELNOTES
