#!/usr/bin/make -f

#export DH_VERBOSE = 1
export QT_SELECT := qt5
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

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

%:
	dh $@ --with kf5

override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DKDE_INSTALL_BINDIR=/usr/games -DQML_BOX2D_MODULE=disabled -DBUILD_TESTING=ON

override_dh_auto_test:
	xvfb-run -a dh_auto_test

# Use an epoch for the transitional gcompris package, because of the break in
# numbering scheme introduced by the Qt rewrite
override_dh_gencontrol-indep:
	dh_gencontrol -pgcompris -- -v1:$(DEB_VERSION)
	dh_gencontrol --remaining-packages

execute_after_override_dh_auto_clean:
	find src -name '*.qrc' -delete
	rm -f src/activities/activities_out.txt
