#!/usr/bin/make -f

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

%:
	dh $@ --with kf5

override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF

override_dh_install:
	# create this directory if not existing, so kdevelop-data.install
	# is the same, no matter whether clang is built
	mkdir -p debian/tmp/usr/share/kdevclangsupport/
	dh_install

override_dh_missing:
	dh_missing --list-missing

override_dh_strip:
	dh_strip --dbgsym-migration='kdevelop-dbg (<< 4:4.7.3-3~)'

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_gencontrol:
	dh_gencontrol -- -V'kdevelop:clang=$(shell dpkg -S "$(shell realpath $(shell which clang))" | cut -d: -f1)'

.PHONY: override_dh_auto_test
