#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export QT_SELECT:=5

# one ring to rule them all ...
%:
	dh $@ --with kf5

override_dh_auto_configure:
	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF

execute_after_dh_auto_install:
	# remove all the development files
	find debian/kbibtex -name '*.so' -type l -delete
	rm -rf debian/kbibtex/usr/lib/*/cmake/
	rm -rf debian/kbibtex/usr/include/
	# drop the spurious RUNPATH
	chrpath -d debian/kbibtex/usr/bin/*
	chrpath -d debian/kbibtex/usr/lib/*/libkbibtex*.so.*
	chrpath -d debian/kbibtex/usr/lib/*/qt5/plugins/kbibtexpart.so

override_dh_auto_test:
	# the unit tests fail ATM
	:
