#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --without autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --bindir=\$${prefix}/games --localstatedir=/var/games
# With 1.2.4 we need to prevent Make wanting to run aclocal, automake etc.
# (the distribution versions are different from those expected in the build)
	find . -name Makefile\* -exec touch -r debian/changelog {} +
	touch -r debian/changelog aclocal.m4 configure configure.ac

execute_after_dh_install-indep:
	rm -f $(CURDIR)/debian/lbreakouthd-data/usr/share/games/lbreakouthd/themes/*/SIL-OFL.txt

execute_after_dh_install-arch:
	mkdir -p $(CURDIR)/debian/lbreakouthd/usr/share/games/lbreakouthd
	mv $(CURDIR)/debian/lbreakouthd/var/games/lbreakouthd.hscr $(CURDIR)/debian/lbreakouthd/usr/share/games/lbreakouthd/lbreakouthd.hscr.blank
	rmdir $(CURDIR)/debian/lbreakouthd/var/games/
	rmdir $(CURDIR)/debian/lbreakouthd/var/
