#!/usr/bin/make -f

GNOME_DOWNLOAD_URL = http://pawsa.fedorapeople.org/balsa/$(GNOME_TARBALL)
TARBALL_EXT := tar.bz2
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

# Ensure at build time that the library has no dependencies on undefined
# symbols, and speed up loading.
LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

# Compile options
DEB_CONFIGURE_EXTRA_FLAGS += --disable-smime \
			--with-compface \
			--with-gpgme \
			--with-gss \
			--with-gtkspell \
			--with-ldap \
			--with-sqlite \
			--with-ssl \
			--with-gtksourceview=2 \
			--enable-extra-mimeicons \
			--with-libnotify \
			--with-rubrica \
			--with-canberra \
			--with-unique \
			--enable-threads

ifneq ($(DEB_BUILD_ARCH_OS),linux)
  DEB_CONFIGURE_EXTRA_FLAGS += --without-nm
endif

DEB_CONFIGURE_SCRIPT_ENV += GTK_UPDATE_ICON_CACHE=/bin/true

# Ensure that .gmo files are gone before package building
cleanbuilddir/balsa::
	rm -f po/*.gmo
	rm -f balsa.desktop
