# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dovecot-fts-xapian
pkgver=1.9.1
pkgrel=2
pkgdesc="Dovecot xapian fts plugin"
url="https://github.com/grosjo/fts-xapian"
arch="all"
license="LGPL-2.1-or-later"
depends="dovecot xapian-core"
makedepends="autoconf automake chrpath dovecot-dev icu-dev libtool sqlite-dev xapian-core-dev"
source="$pkgname-$pkgver-1.tar.gz::https://github.com/grosjo/fts-xapian/archive/$pkgver.tar.gz"
builddir="$srcdir/"fts-xapian-$pkgver

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	PANDOC=false ./configure \
		--enable-static=no \
		--with-dovecot=/usr/lib/dovecot
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	chrpath -d "$pkgdir"/usr/lib/dovecot/lib21_fts_xapian_plugin.so
}

sha512sums="
2361cb613a932bdf780c0ef940c13186ff117dae2007ee5b8b250bcced21a93968aaa298b1f1b7f473276ebe8091e5d5e7fd34c891dfa82ab9fe2fc0788cb22e  dovecot-fts-xapian-1.9.1-1.tar.gz
"
