#!/usr/bin/make -f

#export DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

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

%:
	dh $@ --with kf6 --buildsystem kf6

override_dh_auto_configure:
	dh_auto_configure -- -DKDE_INSTALL_BINDIR=/usr/games/ \
						 -DCOMPILE_DOC=ON \
    					 -DQML_BOX2D_LIBRARY=/usr/lib/${DEB_BUILD_MULTIARCH}/Box2D/qmldir

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

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