#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

%:
	dh $@ --with autotools_dev --parallel 

override_dh_auto_configure:
	dh_auto_configure --
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--enable-gpgme \
		--enable-ipv6 \
		--enable-aspell \
		--enable-jpilot \
		--enable-ldap \
		--enable-spamassassin-plugin=yes \
		--disable-dillo-viewer-plugin \
		--with-manualdir=/usr/share/doc/claws-mail \
		--with-config-dir=.claws-mail

override_dh_clean:
	$(MAKE) -C debian/manpages clean
	dh_clean

override_dh_auto_build:
	$(MAKE) -C debian/manpages
	dh_auto_build

override_dh_strip:
	dh_strip --dbg-package=claws-mail-dbg
