#!/usr/bin/make -f

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

%:
	dh $@ --with kf5,pkgkde_symbolshelper --buildsystem kf5 --without build_stamp

override_dh_auto_configure:
	dh_auto_configure -- -DBINARY_ICONS_RESOURCE=ON

override_dh_auto_install:
	dh_auto_install --destdir=debian/breeze-icon-theme

override_dh_install:
	dh_install --sourcedir=debian/breeze-icon-theme
	rm debian/breeze-icon-theme/usr/share/icons/*/*.rcc
	find $(CURDIR)/debian/breeze-icon-theme -type d -print0 |xargs -0 rmdir --ignore-fail-on-non-empty
	bash $(CURDIR)/debian/symlink_duplicates.sh $(CURDIR)/debian/breeze-icon-theme $(CURDIR)/debian/breeze-icon-theme/usr/share/icons
