net-mail/dovecot-fts-flatcurve: new package, add 1.0.5

Closes: https://bugs.gentoo.org/833592
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
This commit is contained in:
Nicolas PARLANT
2024-10-23 01:29:49 +02:00
parent 053c945863
commit 5c34e0da91
4 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST dovecot-fts-flatcurve-1.0.5.tar.gz 114989 BLAKE2B e97296ba66f7d7be261a6ae8875beab52acd5f4acd05571249d717e1f818f149bd33992a271379ed74213e2f58c491d5ae12eef28eba089deb53b02829fd1eda SHA512 3741fc8b67de21d3badc86ed02ae1bd88f1350a050cc568a17509e6bd6ff506af11fa1ded37d5446fd730e30aa521b77357e5de8e656c71c11a7da75ffe1d8a3

View File

@@ -0,0 +1,46 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
DESCRIPTION="Dovecot FTS plugin to enable message indexing using Xapian"
HOMEPAGE="https://github.com/slusarz/dovecot-fts-flatcurve"
SRC_URI="https://github.com/slusarz/dovecot-fts-flatcurve/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="textcat"
DEPEND="
<net-mail/dovecot-2.4.0:=[stemmer,textcat?]
>=dev-libs/xapian-1.4.0
"
RDEPEND="${DEPEND}"
src_prepare() {
default
eautoreconf
}
src_configure() {
econf --with-dovecot="${EPREFIX}/usr/$(get_libdir)/dovecot"
}
src_install() {
default
find "${D}" -name "*.la" -delete
dodoc "${FILESDIR}/90-fts.conf"
}
pkg_postinst() {
elog "For configuration, report to https://slusarz.github.io/dovecot-fts-flatcurve/configuration.html"
elog "The steps are as follows : "
elog "Insert 'mail_plugins = $mail_plugins fts fts_flatcurve' in /etc/dovecot/conf.d/10-mail.conf"
elog "Set configuration in /etc/dovecot/conf.d/90-fts.conf"
elog "See example : /usr/share/doc/${P}/90-fts.conf.bz2"
}

View File

@@ -0,0 +1,40 @@
plugin {
fts = flatcurve
# Fall back to built in search
fts_enforced = yes
# Proactively index mail as it is delivered or appended, not only when
# searching.
fts_autoindex = yes
# Detected languages. Languages that are not recognized, default to the
# first enumerated language, i.e. en.
fts_languages = en es de fr
# Path to the textcat/exttextcat configuration file, which lists the
# supported languages.
fts_language_config = /usr/share/libexttextcat/fpdb.conf
# This chain of filters first normalizes and lower cases the text, then
# stems the words and lastly removes stopwords.
fts_filters = normalizer-icu snowball stopwords
# This chain of filters will first lowercase all text, stem the words,
# remove possessive suffixes, and remove stopwords.
fts_filters_en = lowercase snowball english-possessive stopwords
# This chain of filters will first lowercase all text, stem the words,
# delete contractions with French, and remove stopwords.
fts_filters_fr = lowercase snowball contractions stopwords
# These tokenizers will preserve addresses as complete search tokens, but
# otherwise tokenize the text into "words".
fts_tokenizer_generic = algorithm=simple maxlen=30
fts_tokenizers = generic email-address
# Exclude mailboxes we do not wish to index automatically.
# These will be indexed on demand, if they are used in a search.
fts_autoindex_exclude = \Trash
fts_autoindex_exclude2 = \Junk
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ppn@parhuet.fr</email>
<name>Nicolas PARLANT</name>
</maintainer>
<use>
<flag name="textcat">Add libtextcat language guessing support for full text search (FTS)</flag>
</use>
<upstream>
<remote-id type="github">slusarz/dovecot-fts-flatcurve</remote-id>
</upstream>
</pkgmetadata>