#!/usr/bin/make -f

GNOME_DOWNLOAD_URL = https://pawsa.fedorapeople.org/balsa/$(GNOME_TARBALL)
TARBALL_EXT := tar.bz2
-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.
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with gnome

# Compile options
override_dh_auto_configure:
	dh_auto_configure -- --with-compface \
			--with-gpgme \
			--with-gss \
			--with-spell-checker=gspell \
			--with-ldap \
			--with-sqlite \
			--with-gtksourceview \
			--enable-extra-mimeicons \
			--with-libnotify \
			--with-rubrica \
			--with-canberra \
			--with-libsecret \
			--with-gnome \
			--with-html-widget=webkit2

override_dh_strip:
	dh_strip --dbgsym-migration='balsa-dbg (<< 2.5.3-1)'

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