#!/usr/bin/make -f
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DH_ALWAYS_EXCLUDE:=CVS:.svn:.svnignore:.git:.gitignore

CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_INSTALL_BINDIR=/usr/games \
			-DCMAKE_INSTALL_DATADIR=/usr/share/games \
			-DPENTOBI_BUILD_TESTS=ON

override_dh_auto_build:
	convert -scale 32x32 src/pentobi/icons/pentobi.svg \
			src/pentobi/icons/pentobi.xpm
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	rm -f debian/pentobi/usr/share/doc/pentobi/COPYING
	# Replace duplicate files of en_CA and en_GB manuals with symlinks.
	rdfind -outputname /dev/null -makesymlinks true \
			debian/pentobi/usr/share/doc/pentobi/manual
	symlinks -r -s -c debian/pentobi/usr/share/doc/pentobi/manual

%:
	dh $@ --parallel
