#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

%:
	dh $@ --parallel --with kf5

override_dh_auto_configure:
	# NB: building with USE_QT_XCB for Qt 5.12. Qt 5.12's XCB changed substantially and
	#   the embedded XCB extension is no longer working. As discussed with @boud
	#   it's best to simply switch to Qt's default handling for now as it is
	#   unclear if the embedded stuff is even still necessary (caused lockup
	#   when used in tablet mode). In the future it should be reviewed if
	#   this is still applicable.
	dh_auto_configure -Skf5 -- -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF \
		-DUSE_QT_XCB=ON

override_dh_auto_install:
	dh_auto_install
	# remove symlinks of private libraries
	find debian/tmp -name '*.so' -type l -print -delete

override_dh_install:
	dh_install --list-missing

.PHONY: override_dh_auto_test
