#!/usr/bin/make -f
# -*- makefile -*-

%:
	dh  $@

override_dh_auto_configure:
	# We configure by writing to Makefile.local
	echo "INSTALLDIR=debian/openttd-opensfx/usr/share/games/openttd/data/" >> Makefile.local

# Point dh_installchangelogs to the upstream changelog
override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.txt

override_dh_auto_test:
	# Check if the md5 sums of the resulting grf files match. This
	# ensures no problems will arise in online play, which uses both
	# version info and md5 sums of files. We don't use dh_auto_test
	# here, because "make test" is also supported, but gives debug
	# output.
	make check

override_dh_auto_clean:
	# Don't use dh_auto_clean. It thinks make distclean is valid becaue
	# it generates output (dependency analysis) before erroring out.
	make clean
	# Remove our additions to Makefile.local
	sed -i "/^INSTALLDIR=/d" Makefile.local
