#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk

LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

# 01_ubuntu_theme.patch requires regeneration of autoconf and automake files.
#
# It would be nice if we could just say:
#    DEB_AUTO_UPDATE_AUTOMAKE := 1.9
#    DEB_AUTO_UPDATE_AUTOCONF := 2.61
# but cdbs is currently hardwired to always run aclocal if running automake.
# So, we copy the rules from autotools-files.mk, and prune appropriately.

common-configure-arch common-configure-indep:: debian/stamp-autotools-files
debian/stamp-autotools-files:
	cd $(DEB_SRCDIR) && autoconf
	cd $(DEB_SRCDIR) && automake
	cd $(DEB_SRCDIR) && touch aclocal.m4 # Avoid remaking by package's Makefile
	touch debian/stamp-autotools-files

clean::
	rm -f debian/stamp-autotools-files

binary-install/notification-daemon::
		rm debian/notification-daemon/usr/lib/notification-daemon-1.0/engines/*.a
		rm debian/notification-daemon/usr/lib/notification-daemon-1.0/engines/*.la
