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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

libpkgs_gen_strict_local_shlibs = $(libpkgs_all_packages) kwin-common
include /usr/share/pkg-kde-tools/qt-kde-team/2/library-packages.mk

%:
	dh $@

override_dh_python3:
	dh_python3 usr/share/kconf_update/


override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF \
		-DQTWAYLANDSCANNER_KDE_EXECUTABLE=/usr/lib/qt5/bin/qtwaylandscanner

override_dh_auto_test:
	# Disable auto tests at build time
	:

override_dh_gencontrol-arch: libpkgs_gen_strict_local_shlibs
	dh_gencontrol -a

# TODO: fixes OBS running lintian -i with a non-existent .changes filename (Ubuntu/KF5? only)
ifeq ($(shell dpkg-vendor --query Vendor), Ubuntu)
override_dh_kubuntu_execute_lintian:
	dh_kubuntu_execute_lintian
	dpkg-genchanges -O../$(shell dpkg-parsechangelog -S Source)-xUbuntu_$(shell lsb_release -s -r)_$(shell dpkg-architecture -q DEB_BUILD_ARCH).changes
endif
