#!/usr/bin/make -f

#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@


override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBIN_DIR=games \
		-DATA_DIR=/usr/share/games/slimevolley \
		-DDATA_INSTALL_DIR=/usr/share/games/slimevolley

override_dh_auto_install:
	dh_auto_install
	$(RM) $(CURDIR)/debian/tmp/usr/share/games/slimevolley/themes/default/police.ttf

get-orig-source:
	mkdir get-orig-source-tmp
	uscan --download-current-version --destdir=get-orig-source-tmp && \
		cd get-orig-source-tmp && \
		tar xzf slimevolley_2.4.2.orig.tar.gz && \
		cp slimevolley-2.4.2/data/themes/mushrooms/police.ttf \
			slimevolley-2.4.2/data/themes/default/police.ttf && \
		tar zcf ../../slimevolley_2.4.2+dfsg.orig.tar.gz slimevolley-2.4.2 && \
		cd ..
	$(RM) -rf get-orig-source-tmp