#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-gpgme \
		--enable-ssl \
		--enable-jpilot \
		--enable-ldap \
		--enable-jconv \
		--enable-ipv6 \
		--enable-gtkspell \
		--enable-oniguruma \
		--disable-updatecheck \
		--with-plugindir=/usr/lib/$(DEB_HOST_MULTIARCH)/sylpheed/plugins
		--with-manualdir=/usr/share/doc/sylpheed-doc/manual \
		--with-faqdir=/usr/share/doc/sylpheed-doc/FAQ

override_dh_auto_install:
	dh_auto_install
	$(MAKE) -C plugin/attachment_tool \
		DESTDIR=$(CURDIR)/debian/tmp install-plugin
	rm -f $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
 
override_dh_strip:
	dh_strip --dbg-package=sylpheed-dbg

