aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas PARLANT <nicolas.parlant@parhuet.fr>2024-10-23 01:29:49 +0200
committerNicolas PARLANT <nicolas.parlant@parhuet.fr>2024-10-23 01:30:59 +0200
commit5c34e0da91c585079af93870da6df93794ee6e75 (patch)
tree4a7a761208385ba20483534bf98c375f4ab0a3da /net-mail
parentnet-misc/warp: add missing gtk[X] dependency (diff)
downloadguru-5c34e0da91c585079af93870da6df93794ee6e75.tar.gz
guru-5c34e0da91c585079af93870da6df93794ee6e75.tar.bz2
guru-5c34e0da91c585079af93870da6df93794ee6e75.zip
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>
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/dovecot-fts-flatcurve/Manifest1
-rw-r--r--net-mail/dovecot-fts-flatcurve/dovecot-fts-flatcurve-1.0.5.ebuild46
-rw-r--r--net-mail/dovecot-fts-flatcurve/files/90-fts.conf40
-rw-r--r--net-mail/dovecot-fts-flatcurve/metadata.xml14
4 files changed, 101 insertions, 0 deletions
diff --git a/net-mail/dovecot-fts-flatcurve/Manifest b/net-mail/dovecot-fts-flatcurve/Manifest
new file mode 100644
index 000000000..ca76ffa15
--- /dev/null
+++ b/net-mail/dovecot-fts-flatcurve/Manifest
@@ -0,0 +1 @@
+DIST dovecot-fts-flatcurve-1.0.5.tar.gz 114989 BLAKE2B e97296ba66f7d7be261a6ae8875beab52acd5f4acd05571249d717e1f818f149bd33992a271379ed74213e2f58c491d5ae12eef28eba089deb53b02829fd1eda SHA512 3741fc8b67de21d3badc86ed02ae1bd88f1350a050cc568a17509e6bd6ff506af11fa1ded37d5446fd730e30aa521b77357e5de8e656c71c11a7da75ffe1d8a3
diff --git a/net-mail/dovecot-fts-flatcurve/dovecot-fts-flatcurve-1.0.5.ebuild b/net-mail/dovecot-fts-flatcurve/dovecot-fts-flatcurve-1.0.5.ebuild
new file mode 100644
index 000000000..0c5ead709
--- /dev/null
+++ b/net-mail/dovecot-fts-flatcurve/dovecot-fts-flatcurve-1.0.5.ebuild
@@ -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"
+}
diff --git a/net-mail/dovecot-fts-flatcurve/files/90-fts.conf b/net-mail/dovecot-fts-flatcurve/files/90-fts.conf
new file mode 100644
index 000000000..937cd9d4c
--- /dev/null
+++ b/net-mail/dovecot-fts-flatcurve/files/90-fts.conf
@@ -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
+}
diff --git a/net-mail/dovecot-fts-flatcurve/metadata.xml b/net-mail/dovecot-fts-flatcurve/metadata.xml
new file mode 100644
index 000000000..1ecde02fb
--- /dev/null
+++ b/net-mail/dovecot-fts-flatcurve/metadata.xml
@@ -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>