#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS := --enable-libsensors=yes --enable-procacpi --enable-hddtemp=yes

DEB_DH_MAKESHLIBS_ARGS_ALL += -X debian/xfce4-sensors-plugin/usr/lib/xfce4/modules/libxfce4sensors.so.1.0.0
DEB_INSTALL_MANPAGES_xfce4-sensors-plugin := debian/xfce4-sensors.1

post-patches::
	NOCONFIGURE=1 xdt-autogen

clean::
	rm -f $$(find -name 'Makefile.in*')
	rm -f aclocal.m4 configure

binary-post-install/xfce4-sensors-plugin::
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/panel-plugins/*.a
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/panel-plugins/*.la
	rmdir debian/`dh_listpackages`/usr/lib/xfce4/panel-plugins
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/modules/*.a
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/modules/*.la
