#!/usr/bin/make -f

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

override_dh_autoreconf:
	NOCONFIGURE=1 dh_autoreconf xdt-autogen

override_dh_auto_configure:
	dh_auto_configure -- --enable-thunarx \
	 	--docdir=\$${prefix}/share/doc/xfdesktop4-data \
		--disable-silent-rules

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

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

override_dh_strip:
	dh_strip --dbgsym-migration='xfdesktop4-dbg (<< 4.12.3-3~)'

%:
	dh $@ --parallel
