#!/usr/bin/make -f

# hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

LDFLAGS += -Wl,--as-needed

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-DWITH_KF5WALLET=ON

override_dh_install:
	dh_install
	# don't list the remmina session on gdm
	rm $(CURDIR)/debian/remmina/usr/share/xsessions/remmina-gnome.desktop
	cd po; intltool-update --pot --verbose -g remmina
	[ -d debian/remmina-common ] && \
		find $(CURDIR)/debian/remmina-common -name "*remmina.desktop" -delete && \
		find $(CURDIR)/debian/remmina-common -name "*remmina.1" -delete && \
		find $(CURDIR)/debian/remmina-common -type d -empty -delete || true

override_dh_clean:
	-rm po/remmina.pot
	dh_clean
