#!/usr/bin/make -f

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

%:
	dh $@ --parallel --with kf5

override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF

override_dh_auto_clean:
	dh_auto_clean
	rm -rf debian/man/out
	-rmdir debian/man

override_dh_auto_build:
	dh_auto_build --parallel
	if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
	for f in $$(find debian/man -name '*.man'); do \
		soelim -I debian/man $$f \
		> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
	done

override_dh_install:
	dh_install --list-missing

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

.PHONY: override_dh_auto_test
