#!/usr/bin/make -f


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

%:
	dh $@ --parallel --with autotools-dev

override_dh_auto_configure:
	NOCONFIGURE=1 xdt-autogen
	dh_auto_configure

override_dh_auto_clean:
	dh_auto_clean
	rm -f $$(find -name 'Makefile.in*') compile *.in
	rm -f INSTALL aclocal.m4 config.guess config.sub configure
	rm -f depcomp install-sh ltmain.sh missing mkinstalldirs

override_dh_install:
	-rm -rf debian/`dh_listpackages`/usr/lib/$(DEB_HOST_MULTIARCH)/xfce4/panel-plugins/*.a
	-rm -rf debian/`dh_listpackages`/usr/lib/$(DEB_HOST_MULTIARCH)/xfce4/panel-plugins/*.la
	dh_install --fail-missing
