mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
mail-filter/rspamd: add 4.1.1
Signed-off-by: Petr Vaněk <arkamar@gentoo.org> Bug: https://bugs.gentoo.org/973396
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST rspamd-3.13.2.tar.gz 6634719 BLAKE2B e9d564b21d1a13707c01a621836a7198afa9a5a5a88f872b60944ba9ef5fb2a0b98adf485dd28c852eca634a54dfea66afc141a5cea864e98826ec6f6768a285 SHA512 ff8d9c59f6d0caabf563e2c07bff5adf8cb82dd0988d595900e0206a0315433c69ee425c50d4b5073c3d14f16615f11d7776986fe77b41daed7801e7522244ba
|
||||
DIST rspamd-3.14.3.tar.gz 6747546 BLAKE2B e4ced7bf29129ffa283f63fcf78c70a23ef158ad84161557041d9ae353c0d270f78677d574a3cc6adad1aa41b1f83c88b127c294675c0137eae0285e79e53740 SHA512 93b1140ca919b6ed099269d167b69a9a5dbd4135fedf530c20d94896fe27f9d9a55fb6662e343a503ac11c5e02695b6e58b36f4278d668a21c8b860462eafd35
|
||||
DIST rspamd-4.0.1.tar.gz 6998348 BLAKE2B cf7bb26a3e4e911246b90488f854d79a2b8e2208ebb718472413737bb496f523a2bc82f0e112298a251d27bd2be2e2a166d14648b64c3d9807507c75a5c59dd9 SHA512 4fafba3af4d7456376bc7f0c6b56bd0bed0bcd4d5420b36c1a359639db9941d3069ddfcb7ae91f5384f69b3e4a68586d0347f249137a829366ff5e5bfb19b815
|
||||
DIST rspamd-4.1.1.tar.gz 7200250 BLAKE2B 1bb3d606abe37324fdfc33b3bf095d21dd4c4cb30c5eec27b40d1060f5e0d4d085bddb792c63be9a7d09018987cb053a7d90786fdcdbcf51f147c9f7afcc9892 SHA512 80f77fe641ae77c2cf874bcc5e7cf854a3a0f1ae9386a49f6497c99486d49ddfc52d311d593dd811d4c13acdadcf7377ee818bac7e48eb2e479526f19741581d
|
||||
|
||||
149
mail-filter/rspamd/rspamd-4.1.1.ebuild
Normal file
149
mail-filter/rspamd/rspamd-4.1.1.ebuild
Normal file
@@ -0,0 +1,149 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( lua5-{3..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 +hyperscan +jit selinux test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# A part of tests use ffi luajit extension
|
||||
REQUIRED_USE="${LUA_REQUIRED_USE}
|
||||
test? ( lua_single_target_luajit )"
|
||||
|
||||
RDEPEND="
|
||||
${LUA_DEPS}
|
||||
$(lua_gen_cond_dep '
|
||||
dev-lua/LuaBitOp[${LUA_USEDEP}]
|
||||
dev-lua/lua-argparse[${LUA_USEDEP}]
|
||||
')
|
||||
acct-group/rspamd
|
||||
acct-user/rspamd
|
||||
app-arch/libarchive:=
|
||||
app-arch/zstd:=
|
||||
dev-db/sqlite:3
|
||||
dev-libs/glib:2
|
||||
dev-libs/icu:=
|
||||
dev-libs/libpcre2:=[jit=]
|
||||
dev-libs/libsodium:=
|
||||
dev-libs/openssl:0=[-bindist(-)]
|
||||
dev-libs/snowball-stemmer:=
|
||||
virtual/zlib:=
|
||||
blas? (
|
||||
virtual/blas
|
||||
virtual/lapack
|
||||
)
|
||||
hyperscan? ( dev-libs/vectorscan:= )
|
||||
selinux? ( sec-policy/selinux-spamassassin )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-cpp/doctest
|
||||
>=dev-libs/xxhash-0.8.0
|
||||
"
|
||||
BDEPEND="
|
||||
dev-lang/perl
|
||||
dev-util/ragel
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.12-cmake-lua-version.patch"
|
||||
"${FILESDIR}/${PN}-3.14.1-unbundle-lua.patch"
|
||||
"${FILESDIR}/${PN}-3.12-unbundle-snowball.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
rm -vrf contrib/{doctest,lua-{argparse,bit},snowball,xxhash,zstd} || die
|
||||
|
||||
> cmake/Toolset.cmake || die #827550
|
||||
|
||||
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
|
||||
-DLIBDIR="/usr/$(get_libdir)/rspamd"
|
||||
|
||||
-DSYSTEM_DOCTEST=ON
|
||||
-DSYSTEM_XXHASH=ON
|
||||
-DSYSTEM_ZSTD=ON
|
||||
|
||||
# For bundled https://github.com/bombela/backward-cpp
|
||||
# Bundled backward library uses execinfo.h in current setting, which is
|
||||
# available in glibc, but not in musl. Let's enable it for glibc only.
|
||||
-DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
|
||||
-DSTACK_DETAILS_AUTO_DETECT=OFF
|
||||
|
||||
-DENABLE_BLAS=$(usex blas ON OFF)
|
||||
-DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
|
||||
-DENABLE_JEMALLOC=OFF
|
||||
-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
|
||||
-DENABLE_PCRE2=ON
|
||||
|
||||
-DBUILD_TESTING=$(usex test ON OFF)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# These variables ensure tests use Lua scripts from this package rather
|
||||
# than the installed version. However, rspamd always first attempts to load
|
||||
# from /etc/rspamd/lua, with no method to override this behavior.
|
||||
LUA_PATH="${S}/contrib/lua-?/?.lua;$(lua_get_lmod_dir)/?.lua" \
|
||||
LUALIBDIR="${S}/lualib" \
|
||||
RULESDIR="${S}/lualib" \
|
||||
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 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"
|
||||
}
|
||||
Reference in New Issue
Block a user