#!/usr/bin/make -f

include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk

lib_pkgs := calligra-libs

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

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

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

override_dh_auto_configure:
	dh_auto_configure -Skde -- -DCMAKE_BUILD_TYPE=Release -DBUILD_KF5=ON

override_dh_auto_install:
	dh_auto_install
	# Remove development stuff:
	# - symlinks of libraries
	find debian/tmp/usr/lib -name '*.so' -type l -print -delete
	# Remove mimetypes already provided by shared-mime-info
	rm -f debian/tmp/usr/share/mime/packages/msooxml-all.xml
	rm -f debian/tmp/usr/share/mime/packages/x-iwork-keynote-sffkey.xml

override_dh_install:
	dh_install --list-missing

override_dh_shlibdeps:
	$(overridden_command) -pcalligrasheets -- -xlibgcc1
	$(overridden_command) --remaining-packages

override_dh_strip:
	dh_strip --dbgsym-migration='calligra-dbg (<< 1:2.9.11)'

.PHONY: override_dh_auto_test
