summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Roessner <c@roessner-network-solutions.com>2017-01-05 18:54:33 +0100
committerDirkjan Ochtman <djc@gentoo.org>2017-01-08 09:35:51 +0100
commit46c0780bef4f21a9683afce5cfba8ac7f66fdde1 (patch)
tree367e40a58768b82ea7eb555f8eb9d3df3c9f945d /mail-filter/rspamd
parentdev-python/jinja: version bump to 2.9.2 (diff)
downloadgentoo-46c0780bef4f21a9683afce5cfba8ac7f66fdde1.tar.gz
gentoo-46c0780bef4f21a9683afce5cfba8ac7f66fdde1.tar.bz2
gentoo-46c0780bef4f21a9683afce5cfba8ac7f66fdde1.zip
mail-filter/rspamd: Adding and removing use flags and deps
Bump to 1.4.1-r2. Merging new USE flags from live ebuild and adding PAX Live-ebuild. Adding pcre2 and jemalloc USE flags. Dropping gmime support
Diffstat (limited to 'mail-filter/rspamd')
-rw-r--r--mail-filter/rspamd/metadata.xml2
-rw-r--r--mail-filter/rspamd/rspamd-1.4.2.ebuild80
-rw-r--r--mail-filter/rspamd/rspamd-9999.ebuild26
3 files changed, 99 insertions, 9 deletions
diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index aee0fd268f81..b628e7d07744 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -10,5 +10,7 @@
</upstream>
<use>
<flag name="fann">Enable neural network plugin (requires <pkg>sci-mathematics/fann</pkg>).</flag>
+ <flag name="pcre2">Use dev-libs/libpcre2</flag>
+ <flag name="jemalloc">Use dev-libs/jemalloc for allocations</flag>
</use>
</pkgmetadata>
diff --git a/mail-filter/rspamd/rspamd-1.4.2.ebuild b/mail-filter/rspamd/rspamd-1.4.2.ebuild
new file mode 100644
index 000000000000..9d671525f843
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.4.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils pax-utils user systemd
+
+DESCRIPTION="Rapid spam filtering system"
+SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
+HOMEPAGE="https://github.com/vstakhov/rspamd"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fann jemalloc +jit libressl pcre2"
+
+RDEPEND="!libressl? ( dev-libs/openssl:0=[-bindist] )
+ libressl? ( dev-libs/libressl:0= )
+ fann? ( sci-mathematics/fann )
+ pcre2? (
+ dev-libs/libpcre2[jit=]
+ )
+ !pcre2? (
+ dev-libs/libpcre[jit=]
+ )
+ jit? ( dev-lang/luajit:2 )
+ jemalloc? (
+ dev-libs/jemalloc
+ )
+ dev-libs/libevent
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ dev-libs/gmime
+ dev-util/ragel
+ sys-apps/file
+ virtual/libiconv"
+DEPEND="dev-util/ragel
+ ${RDEPEND}"
+
+QA_MULTILIB_PATHS="usr/lib/rspamd/.*"
+
+pkg_setup() {
+ enewgroup rspamd
+ enewuser rspamd -1 -1 /var/lib/rspamd rspamd
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFDIR=/etc/rspamd
+ -DRUNDIR=/var/run/rspamd
+ -DDBDIR=/var/lib/rspamd
+ -DLOGDIR=/var/log/rspamd
+ -DENABLE_LUAJIT=$(usex jit ON OFF)
+ -DENABLE_FANN=$(usex fann ON OFF)
+ -DENABLE_PCRE2=$(usex pcre2 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}/rspamd.init-r2" rspamd
+
+ # Remove mprotect for JIT support
+ if use jit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-* || die
+ fi
+
+ dodir /var/lib/rspamd
+ dodir /var/log/rspamd
+
+ fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/rspamd.logrotate" rspamd
+
+ systemd_newunit rspamd.service rspamd.service
+}
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 2721f1060f3f..379939d01cae 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit cmake-utils user systemd git-r3
+inherit cmake-utils user systemd git-r3 pax-utils
DESCRIPTION="Rapid spam filtering system"
HOMEPAGE="https://github.com/vstakhov/rspamd"
@@ -13,23 +13,24 @@ EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS=""
-IUSE="fann +gd +jit libressl"
+IUSE="fann +gd pcre2 +jit jemalloc libressl"
RDEPEND="!libressl? ( dev-libs/openssl:0[-bindist] )
libressl? ( dev-libs/libressl:0 )
fann? ( sci-mathematics/fann )
- jit? (
- dev-libs/libpcre[jit]
- dev-lang/luajit:2
+ pcre2? (
+ dev-libs/libpcre2[jit=]
)
- !jit? (
- dev-libs/libpcre[-jit]
- >=dev-lang/lua-5.1:0
+ !pcre2? (
+ dev-libs/libpcre[jit=]
+ )
+ jit? ( dev-lang/luajit:2 )
+ jemalloc? (
+ dev-libs/jemalloc
)
dev-libs/libevent
dev-db/sqlite:3
dev-libs/glib:2
- dev-libs/gmime
dev-util/ragel
sys-apps/file
virtual/libiconv
@@ -53,6 +54,8 @@ src_configure() {
-DENABLE_LUAJIT=$(usex jit ON OFF)
-DENABLE_FANN=$(usex fann ON OFF)
-DENABLE_GD=$(usex gd ON OFF)
+ -DENABLE_PCRE2=$(usex pcre2 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
)
cmake-utils_src_configure
}
@@ -61,6 +64,11 @@ src_install() {
cmake-utils_src_install
newinitd "${FILESDIR}/rspamd.init-r2" rspamd
+ # Remove mprotect for JIT support
+ if use jit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-* || die
+ fi
+
dodir /var/lib/rspamd
dodir /var/log/rspamd