#!/usr/bin/make -f

#export DH_VERBOSE = 1
export QT_SELECT = qt6
export DEB_BUILD_MAINT_OPTIONS = hardening=+all


DEBIAN_VERSION := $(shell lsb_release -cs)


%:
	@if [ $$DEBIAN_VERSION = 'trixie' ]; then \
		dh $@ --with kf6; \
	else \
		dh $@; \
	fi

override_dh_auto_configure:
	@if [ $$DEBIAN_VERSION = 'trixie' ]; then \
		dh_auto_configure -Skf6 -- -DKDE_INSTALL_BINDIR=/usr/games -DQML_BOX2D_MODULE=disabled -DBUILD_TESTING=ON -DCOMPILE_DOC=ON; \
	else \
		dh_auto_configure -- -DKDE_INSTALL_BINDIR=/usr/games -DQML_BOX2D_MODULE=disabled -DBUILD_TESTING=ON -DCOMPILE_DOC=ON; \
	fi
	
override_dh_auto_test:
	echo "Autotest disabled"
# 	xvfb-run -a dh_auto_test

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

