From: "David Roman" <davidroman96@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: net-mail/dovecot-fts-flatcurve/, net-mail/dovecot-fts-flatcurve/files/
Date: Wed, 23 Oct 2024 10:25:31 +0000 (UTC) [thread overview]
Message-ID: <1729639859.5c34e0da91c585079af93870da6df93794ee6e75.davidroman@gentoo> (raw)
commit: 5c34e0da91c585079af93870da6df93794ee6e75
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Tue Oct 22 23:29:49 2024 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Oct 22 23:30:59 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c34e0da
net-mail/dovecot-fts-flatcurve: new package, add 1.0.5
Closes: https://bugs.gentoo.org/833592
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
net-mail/dovecot-fts-flatcurve/Manifest | 1 +
.../dovecot-fts-flatcurve-1.0.5.ebuild | 46 ++++++++++++++++++++++
net-mail/dovecot-fts-flatcurve/files/90-fts.conf | 40 +++++++++++++++++++
net-mail/dovecot-fts-flatcurve/metadata.xml | 14 +++++++
4 files changed, 101 insertions(+)
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>
reply other threads:[~2024-10-23 10:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1729639859.5c34e0da91c585079af93870da6df93794ee6e75.davidroman@gentoo \
--to=davidroman96@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox