#!/usr/bin/make -f
# SPDX-License-Identifier: LGPL-2.0-or-later
# # SPDX-FileCopyrightText: 2023 Jonathan Riddell <jr@jriddell.org>


lib_pkgs := calligra-libs

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

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

%:
	dh $@ --with kf6 --buildsystem kf6

override_dh_auto_install:
	dh_auto_install
	# Remove development stuff:
	# - symlinks of libraries
	find debian/calligra/usr/lib -name '*.so' -type l -print -delete
	# - headers
	rm -rfv debian/calligra/usr/include
	# - cmake configuration files
	rm -rfv debian/calligra/usr/share/kde4/apps/cmake
	# Remove mimetypes already provided by shared-mime-info
	rm -f debian/calligra/usr/share/mime/packages/msooxml-all.xml
	rm -f debian/calligra/usr/share/mime/packages/x-iwork-keynote-sffkey.xml
	# remove calligra plan translations now in separated plan source
	rm -f debian/calligra/usr/share/locale/*/*/*plan*

.PHONY: override_dh_auto_test