aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2020-02-27 03:17:20 +0100
committerMilan P. Stanić <mps@arvanta.net>2020-02-27 11:09:02 +0100
commit52b9aedbd03fc8d66d45f0964e2be7ef0bce516e (patch)
tree5d0cc036b449e328ff4adee991f4b83d015658e4
parent9a47daba4e5be9b521e1579269334f6f8f17345b (diff)
downloadaports-52b9aedbd03fc8d66d45f0964e2be7ef0bce516e.tar.bz2
aports-52b9aedbd03fc8d66d45f0964e2be7ef0bce516e.tar.xz
community/rspamd: upgrade to 2.4
-rw-r--r--community/rspamd/APKBUILD37
-rw-r--r--community/rspamd/OSDep_cmake.patch10
-rw-r--r--community/rspamd/cmakelists.patch10
-rw-r--r--community/rspamd/default-configs.patch6
-rw-r--r--community/rspamd/lua-torch-fix-simd-detection.patch77
5 files changed, 32 insertions, 108 deletions
diff --git a/community/rspamd/APKBUILD b/community/rspamd/APKBUILD
index 8afd24c9a7..940e7ed87e 100644
--- a/community/rspamd/APKBUILD
+++ b/community/rspamd/APKBUILD
@@ -4,11 +4,11 @@
# Contributor: TBK <alpine@jjtc.eu>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=rspamd
-pkgver=1.9.4
-pkgrel=2
+pkgver=2.4
+pkgrel=0
pkgdesc="Fast, free and open-source spam filtering system"
url="https://rspamd.com/"
-arch="all !s390x"
+arch="all"
license="Apache-2.0 BSD-1-Clause BSD-2-Clause BSD-3-Clause CC0 LGPL-2.1-or-later
LGPL-3.0-only MIT Zlib"
pkgusers="rspamd"
@@ -21,6 +21,7 @@ makedepends="
glib-dev
icu-dev
libevent-dev
+ libsodium-dev
openssl-dev
luajit-dev
pcre2-dev
@@ -40,30 +41,32 @@ subpackages="
$pkgname-openrc
$pkgname-dbg
"
-source="$pkgname-$pkgver.tar.gz::https://github.com/vstakhov/$pkgname/archive/$pkgver.tar.gz
+source="$pkgname-$pkgver.tar.gz::https://github.com/vstakhov/rspamd/archive/$pkgver.tar.gz
$pkgname.logrotated
$pkgname.initd
$pkgname.confd
- cmakelists.patch
+ OSDep_cmake.patch
conf-split-workers.patch
default-configs.patch
- lua-torch-fix-simd-detection.patch
"
build() {
- cmake . \
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCONFDIR=/etc/$pkgname \
-DRUNDIR=/run/$pkgname \
-DRSPAMD_USER=$pkgusers \
-DRSPAMD_GROUP=$pkggroups \
- -DENABLE_DB=ON \
- -DENABLE_SQLITE=ON \
- -DENABLE_HIREDIS=ON \
-DENABLE_REDIRECTOR=ON \
-DENABLE_URL_INCLUDE=ON \
-DENABLE_PCRE2=ON \
- -DINSTALL_EXAMPLES=OFF
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} .
make
}
@@ -83,7 +86,6 @@ package() {
mkdir -p ./usr/share/doc/$pkgname
mv ./usr/share/$pkgname/www/README.md \
- ./usr/share/$pkgname/www/plugins.txt \
./usr/share/doc/$pkgname/
install -Dm 644 "$srcdir"/$pkgname.logrotated ./etc/logrotate.d/$pkgname
@@ -114,8 +116,8 @@ utils() {
cd "$pkgdir"
mkdir -p "$subpkgdir"/usr/bin
- mv ./usr/bin/${pkgname}_stats "$subpkgdir"/usr/bin/${pkgname}-stats
- _mv ./usr/bin/${pkgname}-redirector "$subpkgdir"/usr/bin/
+ mv ./usr/bin/"$pkgname"_stats "$subpkgdir"/usr/bin/"$pkgname"-stats
+ _mv ./usr/bin/$pkgname-redirector "$subpkgdir"/usr/bin/
}
fuzzy() {
@@ -153,11 +155,10 @@ _mv() {
mv "$@"
}
-sha512sums="3acecec6adb91580ac2ad96419fdc9588b120ec5a3b4a44135fc5a3e7c15f2dbc99963a8337f9effb9423846489545a55d89d1849c5ba62d8cd91dc67c32d8dc rspamd-1.9.4.tar.gz
+sha512sums="47d64fdadc1c61642efebe4772add48848a45c8106bf431dacb458d85cdd9bf996ca46bcb75d60cedb15ae72518089e9b3e63a0716d22843f5b9f38d7d86be08 rspamd-2.4.tar.gz
2efe28575c40d1fba84b189bb872860e744400db80dce2f6330be6c6287fb3f46e6511284729b957488bf40bcb9b0952e26df9934f5f138334bd2766075c45cb rspamd.logrotated
7add88e4bf3508d2a148241cd8db97851a33a7128be75f2a072a029b32b565e9de0299ad614fbda7f70ed54d1b6e2faa305eff3e443e90451abf59dedc1af576 rspamd.initd
a2003ef0c9d64a44480f59302864a2dfedcbe3a0047fcbb655408bc8aae9014b6ad0ddc6b64d4abeeb21bea0f86678afd30589ac8eed83e07ad7f87710e93702 rspamd.confd
-accbe762e542df65e28301048672d4a0cf3a1c7e9a04c38ab3010f0ed9df9ad1122129727580408a69939f25c4dbea3b2b7aa0d452722125fac9eb0043bb2579 cmakelists.patch
+f78208c06f4e7695f034b755f1e625c0600a590d4a0976e3eff9d163f98f9914a95279a765c225ec152a881533ffa39d2b1ac80afc3ceb98e1d7e2bda9c9a86d OSDep_cmake.patch
a8aefee649bf6630339d1d3f2bb20c25ca70b21a8eaa92951e926d0fd4525f1d4ac4cc7ea66ac2b15323cf02c93c759ddf7181502f0d71b21384ced9d88c008e conf-split-workers.patch
-bca1b1361524e1c582f2d6f9d754766c63f60a856b9f0d858e17dfebb40f2046db3a759eb3dffc5075460c3d3b64224092e043f07bcd8331daa97babc61ea973 default-configs.patch
-2987f122653680207b97a9f93978192384804f93a8fa040085e53a801c77364e8bd7ceb0fabca62a9c7316ff32bcf3dee8f0d1b8cd2c29459c6272a19e8e293b lua-torch-fix-simd-detection.patch"
+62a34af0eb0003c0345823689d199d192f4f7e3221fef5a2af846daf9a6f4c7c934a6b2a89b472ba88f3a371a51b9794901e1dbe871f762c791a257cb7bb6858 default-configs.patch"
diff --git a/community/rspamd/OSDep_cmake.patch b/community/rspamd/OSDep_cmake.patch
new file mode 100644
index 0000000000..f551fca910
--- /dev/null
+++ b/community/rspamd/OSDep_cmake.patch
@@ -0,0 +1,10 @@
+--- a/cmake/OSDep.cmake
++++ b/cmake/OSDep.cmake
+@@ -65,7 +65,6 @@
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv)
+- LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES socket)
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES umem)
+ # Ugly hack, but FindOpenSSL on Solaris does not link with libcrypto
diff --git a/community/rspamd/cmakelists.patch b/community/rspamd/cmakelists.patch
deleted file mode 100644
index 8b9c7fe84d..0000000000
--- a/community/rspamd/cmakelists.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -589,7 +589,6 @@
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv)
-- LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl)
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES socket)
- LIST(APPEND CMAKE_REQUIRED_LIBRARIES umem)
- # Ugly hack, but FindOpenSSL on Solaris does not link with libcrypto
diff --git a/community/rspamd/default-configs.patch b/community/rspamd/default-configs.patch
index fd428c78ca..dcdc8e1ac5 100644
--- a/community/rspamd/default-configs.patch
+++ b/community/rspamd/default-configs.patch
@@ -2,7 +2,7 @@ Distro-specific adjustments of the default configs.
--- a/conf/options.inc
+++ b/conf/options.inc
-@@ -8,7 +8,7 @@
+@@ -21,7 +21,7 @@
map_watch_interval = 5min;
# Multiplier for watch interval for files
map_file_watch_multiplier = 0.1;
@@ -10,8 +10,8 @@ Distro-specific adjustments of the default configs.
+dynamic_conf = "$DBDIR/dynamic";
history_file = "$DBDIR/rspamd.history";
check_all_filters = false;
- dns {
-@@ -25,7 +25,7 @@
+
+@@ -44,7 +44,7 @@
"X-MimeOLE",
];
diff --git a/community/rspamd/lua-torch-fix-simd-detection.patch b/community/rspamd/lua-torch-fix-simd-detection.patch
deleted file mode 100644
index f3df6f87de..0000000000
--- a/community/rspamd/lua-torch-fix-simd-detection.patch
+++ /dev/null
@@ -1,77 +0,0 @@
---- a/contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h
-+++ b/contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h
-@@ -45,7 +45,7 @@
- SIMDExtension_NEON = 0x1,
- #elif defined(__PPC64__)
- SIMDExtension_VSX = 0x1,
--#else
-+#elif defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
- SIMDExtension_AVX2 = 0x1,
- SIMDExtension_AVX = 0x2,
- SIMDExtension_SSE = 0x4,
-@@ -53,31 +53,17 @@
- SIMDExtension_DEFAULT = 0x0
- };
-
-+#if (defined(__arm__) || defined(__aarch64__)) && defined(__NEON__)
-
--#if defined(__arm__) || defined(__aarch64__) // incl. armel, armhf, arm64
--
-- #if defined(__NEON__)
--
- static inline uint32_t detectHostSIMDExtensions()
- {
- return SIMDExtension_NEON;
- }
-
-- #else //ARM without NEON
-+#elif defined(__PPC64__) && defined(__VSX__)
-
- static inline uint32_t detectHostSIMDExtensions()
- {
-- return SIMDExtension_DEFAULT;
--}
--
-- #endif
--
--#elif defined(__PPC64__)
--
-- #if defined(__VSX__)
--
--static inline uint32_t detectHostSIMDExtensions()
--{
- uint32_t hostSimdExts = SIMDExtension_DEFAULT;
- char *evar;
-
-@@ -87,16 +73,8 @@
- return hostSimdExts;
- }
-
-- #else //PPC64 without VSX
-+#elif defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
-
--static inline uint32_t detectHostSIMDExtensions()
--{
-- return SIMDExtension_DEFAULT;
--}
--
-- #endif
--
--#else // x86
- static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
- {
- #if defined(_MSC_VER)
-@@ -158,6 +136,13 @@
- }
-
- return hostSimdExts;
-+}
-+
-+#else
-+
-+static inline uint32_t detectHostSIMDExtensions()
-+{
-+ return SIMDExtension_DEFAULT;
- }
-
- #endif // end SIMD extension detection code