Date: Wednesday, January 13, 2021 @ 19:01:18 Author: hashworks Revision: 820643
Moved package from AUR Added: dovecot-fts-elastic/ dovecot-fts-elastic/repos/ dovecot-fts-elastic/trunk/ dovecot-fts-elastic/trunk/90-fts.conf dovecot-fts-elastic/trunk/PKGBUILD dovecot-fts-elastic/trunk/dovecot-fts-elastic.install -----------------------------+ 90-fts.conf | 12 +++++++++++ PKGBUILD | 45 ++++++++++++++++++++++++++++++++++++++++++ dovecot-fts-elastic.install | 12 +++++++++++ 3 files changed, 69 insertions(+) Added: dovecot-fts-elastic/trunk/90-fts.conf =================================================================== --- dovecot-fts-elastic/trunk/90-fts.conf (rev 0) +++ dovecot-fts-elastic/trunk/90-fts.conf 2021-01-13 19:01:18 UTC (rev 820643) @@ -0,0 +1,12 @@ +mail_plugins = $mail_plugins fts fts_elastic + +plugin { + fts = elastic + fts_elastic = debug url=http://localhost:9200/m/ bulk_size=5000000 refresh=fts rawlog_dir=/var/log/fts-elastic/ + +# no indexes new emails when user make search +# yes indexes every email when delivered + fts_autoindex = no +fts_autoindex_exclude = \Junk +fts_autoindex_exclude2 = \Trash +} Added: dovecot-fts-elastic/trunk/PKGBUILD =================================================================== --- dovecot-fts-elastic/trunk/PKGBUILD (rev 0) +++ dovecot-fts-elastic/trunk/PKGBUILD 2021-01-13 19:01:18 UTC (rev 820643) @@ -0,0 +1,45 @@ +# Maintainer: Justin Kromlinger <hashwo...@archlinux.org> +# Contributor: Marcus Hoffmann <b...@bubu1.eu> + +pkgname=dovecot-fts-elastic +_reponame=fts-elastic +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Dovecot FTS plugin for elasticsearch" +arch=(x86_64) +url="https://github.com/filiphanes/fts-elastic" +license=(MIT) +depends=(dovecot json-c) +backup=('etc/dovecot/conf.d/90-fts.conf') +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" + "90-fts.conf") +sha256sums=('00b1f214791a3d8e01eb9916138dc3d9a8978dd1fa6494c5ae5cf5b7902a0fd5' + '3442fa7350055c7328bcdf2f666727b9a5d8c942a0bfe93044db344c80ad7e69') +install=dovecot-fts-elastic.install + +build() { + cd "${_reponame}-${pkgver}" + + ./autogen.sh + ./configure \ + --prefix=/usr \ + --with-dovecot=/usr/lib/dovecot + + make + make DESTDIR="$(pwd)/build" install +} + +package() { + install -Dm644 90-fts.conf "${pkgdir}/etc/dovecot/conf.d/90-fts.conf" + + cd "${_reponame}-${pkgver}" + + install -Dm644 build/usr/lib/dovecot/lib21_fts_elastic_plugin.so "${pkgdir}/usr/lib/dovecot/modules/lib21_fts_elastic_plugin.so" + install -Dm644 elastic7-schema.json "${pkgdir}/usr/share/doc/dovecot/elastic7-schema.json" + install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + install -Dm644 COPYING.MIT "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.MIT" + + sed -i -e 's/LLL/MMM/g' "${pkgdir}/usr/share/doc/dovecot/elastic7-schema.json" +} + +# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab Added: dovecot-fts-elastic/trunk/dovecot-fts-elastic.install =================================================================== --- dovecot-fts-elastic/trunk/dovecot-fts-elastic.install (rev 0) +++ dovecot-fts-elastic/trunk/dovecot-fts-elastic.install 2021-01-13 19:01:18 UTC (rev 820643) @@ -0,0 +1,12 @@ +#!/bin/bash + +post_install() { + cat <<-EOF + Make sure elasticsearch is started, then create the index mapping with: + + curl -X PUT "http://localhost:9200/m?pretty" -H 'Content-Type: application/json' -d "@/usr/share/doc/dovecot/elastic7-schema.json" + + Make sure the /etc/dovecot/conf.d/90-fts.conf file is included in you dovecot configuration, then restart dovecot. + For more info see: https://github.com/filiphanes/fts-elastic#configuration. + EOF +}