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

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

export QT_SELECT=5

TESTS_HOME=$(CURDIR)/debian/tests.home

%:
	dh $@ --with kf5,pkgkde_symbolshelper --buildsystem kf5 --without build_stamp

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_QCH=ON

override_dh_strip:
	dh_strip --dbgsym-migration='libkf5notifications5-dbg (<= 5.19.0-1~~)'

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p "$(TESTS_HOME)"
	HOME=$(TESTS_HOME) xvfb-run -a dbus-run-session -- dh_auto_test --no-parallel
	rm -rf "$(TESTS_HOME)"
endif
