#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
# It would be nice to add a cool CDBS variable here saying 
# "do not include changelog, AUTHORS and README to dh_installdocs" 
# (see below for the dirty hack)

include /usr/share/cdbs/1/class/autotools.mk

include /usr/share/hardening-includes/hardening.make

LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS+=$(HARDENING_LDFLAGS) -Wl,-z,defs -Wl,--as-needed -Wl,-O1
CFLAGS+=$(HARDENING_CFLAGS)

export CFLAGS LDFLAGS

binary-post-install/xfce4-weather-plugin::
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/panel-plugins/*.a
	-rm -rf debian/`dh_listpackages`/usr/lib/xfce4/panel-plugins/*.la
	# I did not found a better way to do it...
	-cd debian/`dh_listpackages`/usr/share/doc/xfce4-weather-plugin/ && rm changelog AUTHORS README
