summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2021-11-07 22:21:00 +0100
committerSam James <sam@gentoo.org>2021-11-07 23:28:38 +0000
commit5a751a73ab82422e63f50a7350f4789fc7780c06 (patch)
tree02c361299e3043e68bc56a11461e9764c48634f6 /mail-filter
parentdev-tex/latex2html: fix netpbm dependency (diff)
downloadgentoo-5a751a73ab82422e63f50a7350f4789fc7780c06.tar.gz
gentoo-5a751a73ab82422e63f50a7350f4789fc7780c06.tar.bz2
gentoo-5a751a73ab82422e63f50a7350f4789fc7780c06.zip
mail-filter/rspamd: add 3.1
Closes: https://bugs.gentoo.org/822207 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> 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/rspamd-3.1.ebuild124
2 files changed, 125 insertions, 0 deletions
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index fa7fefdafd2d..78c40cf829a4 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1,3 @@
DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4
+DIST rspamd-3.1.tar.gz 5566920 BLAKE2B dfb31534e7dbce303729e89537f83eea90d6524a0ccf81633e0d55840f21936985ba5991f2a2ed9ca5594a4a3938f9366f7a1879fc553f41ab52bb89460b87dc SHA512 3c3c06c10d3dfc90e4bc92c7ebaff4bd4854d3b0e56d6476f0223918c4a52f4cc7a8b381b1f867164199ee18ea00eda77ae0315925f3fd71596d610200667178
diff --git a/mail-filter/rspamd/rspamd-3.1.ebuild b/mail-filter/rspamd/rspamd-3.1.ebuild
new file mode 100644
index 000000000000..df5d75abfd0e
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single 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 pcre2 test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ jit? ( lua_single_target_luajit )
+ test? ( lua_single_target_luajit )"
+
+RDEPEND="${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/LuaBitOp[${LUA_USEDEP}]
+ ')
+ acct-group/rspamd
+ acct-user/rspamd
+ app-arch/zstd:=
+ dev-db/sqlite:3
+ dev-cpp/doctest
+ dev-libs/glib:2
+ dev-libs/icu:=
+ dev-libs/libev
+ dev-libs/libfmt:=
+ dev-libs/libsodium:=
+ dev-libs/snowball-stemmer:=
+ sys-apps/file
+ blas? (
+ virtual/blas
+ virtual/lapack
+ )
+ cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+ jemalloc? ( dev-libs/jemalloc:= )
+ dev-libs/openssl:0=[-bindist(-)]
+ pcre2? ( dev-libs/libpcre2:=[jit=] )
+ !pcre2? ( dev-libs/libpcre[jit=] )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/ragel
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
+ "${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+ "${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ rm -vrf contrib/{doctest,fmt,lua-bit,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
+
+ -DSYSTEM_DOCTEST=ON
+ -DSYSTEM_FMT=ON
+ -DSYSTEM_ZSTD=ON
+
+ -DENABLE_BLAS=$(usex blas ON OFF)
+ -DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+ -DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+ -DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+ -DENABLE_PCRE2=$(usex pcre2 ON OFF)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_build run-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 lua_single_target_luajit; 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"
+}