#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-thunarx \
		--docdir=\$${prefix}/share/doc/xfdesktop4-data \
		--with-default-backdrop-filename=\$${datadir}/backgrounds/default23.png

override_dh_install:
	dh_install
	# why oh why is this necessary?
	rm -rf $(CURDIR)/debian/xfdesktop4-data/usr/share/man

override_dh_installchangelogs:
	DEB_BUILD_OPTIONS=notrimdch dh_installchangelogs NEWS

override_dh_link-arch:
	rm -rf $(CURDIR)/debian/xfdesktop4/usr/share/doc/xfdesktop4
	ln -s xfdesktop4-data $(CURDIR)/debian/xfdesktop4/usr/share/doc/xfdesktop4
	dh_link

# No dbgsym packages:
override_dh_strip:
	@echo "NO--THANKS ANYWAY--but not building dbgsym packages for MX Linux"
	dh_strip --no-automatic-dbgsym
