#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# Augment path to find qhelpgenerator which is not in /usr/bin anymore with the
# demise of qtchooser
export PATH := $(PATH):/usr/lib/qt6/libexec/

%:
	dh $@ --buildsystem=qmake6 --with pkgkde_symbolshelper

override_dh_auto_configure:
	dh_auto_configure --buildsystem=qmake6 -- LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
		CONFIG+=enable-p2p \
		DEFINES+=QT_NO_DEBUG_OUTPUT

execute_after_dh_auto_clean:
	-rm src/signond/backupifadaptor.*

execute_after_dh_auto_install:
	rm -f debian/tmp/usr/include/signon-plugins/*example*.h
	rm -f debian/tmp/usr/include/signon-plugins/*test*.h
	rm -f $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libsignon-qt*.*a
	rm -f $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/signon/libexampleplugin.so

execute_after_dh_install-indep:
	dh_doxygen -i

override_dh_auto_test:
	dbus-run-session -- dh_auto_test --buildsystem=qmake6
