#! /usr/bin/make -f

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

EDS_VERSION = $(shell pkg-config --modversion evolution-data-server-1.2  | awk -F'.' '{print $$1 "." $$2}')
EDS_NEXTVERSION = $(shell pkg-config --modversion evolution-data-server-1.2  | awk -F'.' '{print $$1 "." $$2+1}')
EVO_VERSION = $(shell pkg-config --modversion evolution-shell-3.0  | awk -F'.' '{print $$1 "." $$2}')
EVO_NEXTVERSION = $(shell pkg-config --modversion evolution-shell-3.0  | awk -F'.' '{print $$1 "." $$2+1}')

DEB_DH_GENCONTROL_ARGS_ALL = -- -Veds:Version=$(EDS_VERSION) -Veds:NextVersion=$(EDS_NEXTVERSION) \
                                -Vevo:Version=$(EVO_VERSION) -Vevo:NextVersion=$(EVO_NEXTVERSION)

DEB_DH_MAKESHLIBS_ARGS=-Xevolution

DEB_CONFIGURE_EXTRA_FLAGS += \
       --enable-webkit \
       --disable-gecko \
       --with-primary-render=webkit

binary-post-install/evolution-rss::
	rm -f debian/evolution-rss/usr/lib/evolution/plugins/*.la
	rm -f debian/evolution-rss/usr/lib/evolution/modules/*.la
	rm -rf debian/evolution-rss/usr/share/applications

common-binary-post-install-arch:: list-missing
