#!/usr/bin/make -f

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_makeshlibs:
	dh_makeshlibs -n -X /usr/lib/$(DEB_HOST_MULTIARCH)/thunarx-2/

override_dh_install:
	rm -rf debian/thunar-archive-plugin/usr/lib/$(DEB_HOST_MULTIARCH)/thunarx-2/*.la
	ln -s gnome-file-roller.tap debian/thunar-archive-plugin/usr/lib/$(DEB_HOST_MULTIARCH)/thunar-archive-plugin/org.gnome.FileRoller.tap
	dh_install --fail-missing

%:
	dh $@
