#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
libpkgs_gen_strict_local_shlibs = $(libpkgs_all_packages)
include /usr/share/pkg-kde-tools/qt-kde-team/3/library-packages.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with pkgkde_symbolshelper,sodeps

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_TESTING=OFF

execute_after_dh_auto_install:
	# fix installation of documentation outside /usr/share/doc
	mkdir -p debian/tmp/usr/share/doc/ksysguard-data
	mv debian/tmp/usr/share/ksysguard/scripts/README \
	   debian/tmp/usr/share/doc/ksysguard-data/README.scripts

override_dh_auto_test:
	# Disable dh_auto_test at build time
	:

execute_before_dh_installdeb:
	sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/' \
	  debian/libkf5sysguard-bin.postinst.in > debian/libkf5sysguard-bin.postinst

override_dh_gencontrol-arch: libpkgs_gen_strict_local_shlibs
	dh_gencontrol -a
