summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2020-10-07 15:58:16 +0000
committerSam James <sam@gentoo.org>2020-10-07 15:58:16 +0000
commite0cc7f032415b7c681e75ea79bd2e62d25d4118b (patch)
treedd9f10c66007926dd16f71322754f97720afd952 /mail-filter
parentdev-python/libvirt-python: drop old (diff)
downloadgentoo-e0cc7f032415b7c681e75ea79bd2e62d25d4118b.tar.gz
gentoo-e0cc7f032415b7c681e75ea79bd2e62d25d4118b.tar.bz2
gentoo-e0cc7f032415b7c681e75ea79bd2e62d25d4118b.zip
mail-filter/rspamd: bump to 2.6
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/17834 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/rspamd/Manifest1
-rw-r--r--mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch (renamed from mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch)0
-rw-r--r--mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch (renamed from mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch)0
-rw-r--r--mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch (renamed from mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch)0
-rw-r--r--mail-filter/rspamd/rspamd-2.6.ebuild119
-rw-r--r--mail-filter/rspamd/rspamd-9999.ebuild6
6 files changed, 123 insertions, 3 deletions
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 31a2bd1b901e..7b2fbeee7132 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,2 @@
DIST rspamd-2.5.tar.gz 4490310 BLAKE2B 8d117b1b03e8092d0c724a4da4de23dd145f5b22696aa6b4ef1c208ade28f0d143dd783c9173b6987514b2aef9327ff8fd29eeae5e3da3039d2568384e50a697 SHA512 6068309da98eeb75f95188414b12ce9443aef31200853f820646e70e1dbf2d9d1e2c661a86df2183c175cc01cfb09f6a5c7b8ba358901a56ec6cdb9d9fef4540
+DIST rspamd-2.6.tar.gz 5079444 BLAKE2B acb9d9471d0bb457da33b4d23e3c75ef87ea26a47e6c731bfd5fbbfe28567244e2bc72fd25ca3408db0928dab4e4ab66596e38cf3eff7cb9690eec59d3b62372 SHA512 79e4c1aa763aef753c8d7b2a941ed92b384e96c25e6d1b3bd1321c5acc0ecb934d033a3bf19cb94c89809fd92edec25192cffe97de9e5251681e1a71216b734a
diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch
index 875009da41aa..875009da41aa 100644
--- a/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch
+++ b/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch
diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
index c6f6324befc7..c6f6324befc7 100644
--- a/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
+++ b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch
index 1a7f4453c86f..1a7f4453c86f 100644
--- a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
+++ b/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch
diff --git a/mail-filter/rspamd/rspamd-2.6.ebuild b/mail-filter/rspamd/rspamd-2.6.ebuild
new file mode 100644
index 000000000000..4c166ee4b01a
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-2.6.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit libressl pcre2"
+
+RDEPEND="
+ acct-group/rspamd
+ acct-user/rspamd
+ app-arch/zstd
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ dev-libs/hiredis:=
+ dev-libs/icu:=
+ dev-libs/libev
+ dev-libs/libsodium
+ dev-libs/snowball-stemmer
+ net-libs/libnsl
+ sys-apps/file
+ blas? (
+ virtual/blas
+ virtual/lapack
+ )
+ cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+ jemalloc? ( dev-libs/jemalloc )
+ jit? (
+ dev-lang/luajit:2
+ dev-lua/lpeg[luajit]
+ )
+ !jit? (
+ dev-lang/lua:*
+ dev-lua/lpeg[-luajit]
+ dev-lua/LuaBitOp
+ )
+ !libressl? ( dev-libs/openssl:0=[-bindist] )
+ libressl? ( dev-libs/libressl:0= )
+ pcre2? ( dev-libs/libpcre2[jit=] )
+ !pcre2? ( dev-libs/libpcre[jit=] )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
+ "${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ rm -vrf contrib/{hiredis,lua-{bit,lpeg},snowball,zstd} || die
+
+ sed -i -e 's/User=_rspamd/User=rspamd/g' \
+ rspamd.service \
+ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFDIR=/etc/rspamd
+ -DRUNDIR=/var/run/rspamd
+ -DDBDIR=/var/lib/rspamd
+ -DLOGDIR=/var/log/rspamd
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ -DENABLE_LUAJIT=$(usex jit ON OFF)
+ -DENABLE_PCRE2=$(usex pcre2 ON OFF)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ newconfd "${FILESDIR}"/rspamd.conf rspamd
+ newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+ systemd_newunit rspamd.service rspamd.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+ # Remove mprotect for JIT support
+ if use jit; then
+ pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+ diropts -o rspamd -g rspamd
+ keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index cad053757027..4c166ee4b01a 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -58,10 +58,10 @@ BDEPEND="
"
PATCHES=(
- "${FILESDIR}/rspamd-9999-unbundle-lua.patch"
- "${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
- "${FILESDIR}/rspamd-9999-unbundle-hiredis.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
)
src_prepare() {