PKGBUILDs/extra/rspamd/PKGBUILD

186 lines
5.8 KiB
Bash
Raw Normal View History

2019-08-30 18:36:03 +00:00
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Oleksandr Natalenko <oleksandr@natalenko.name>
# Contributor: Andrew Lewis <nerf@judo.za.org>
# Contributor: mezcal
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove dependency on hyperscan (x86 only)
2020-10-01 14:11:33 +00:00
# - set -DENABLE_HYPERSCAN=OFF, -DENABLE_LTO=OFF
2019-08-30 18:36:03 +00:00
pkgname=rspamd
2023-12-21 02:20:03 +00:00
pkgver=3.7.5
pkgrel=1
2019-08-30 18:36:03 +00:00
epoch=
pkgdesc='Fast, free and open-source spam filtering system'
arch=(x86_64)
url=https://rspamd.com
license=(BSD)
depends=(
file
2023-10-14 14:57:38 +00:00
gcc-libs
2019-08-30 18:36:03 +00:00
glib2
2020-02-11 13:42:35 +00:00
glibc
2019-08-30 18:36:03 +00:00
icu
jemalloc
2023-10-14 14:57:38 +00:00
libelf
2019-10-12 15:45:31 +00:00
libsodium
2019-08-30 18:36:03 +00:00
luajit
openblas
openssl
2022-10-05 23:34:32 +00:00
pcre2
2019-08-30 18:36:03 +00:00
sqlite
zlib
)
makedepends=(
cmake
git
ninja
2020-02-11 13:42:35 +00:00
perl
2019-08-30 18:36:03 +00:00
ragel
)
2023-10-14 14:57:38 +00:00
optdepends=(
'perl: rspamd stats script'
'redis: redis cache and data storage'
)
2019-08-30 18:36:03 +00:00
backup=(
etc/rspamd/actions.conf
etc/rspamd/cgp.inc
etc/rspamd/common.conf
etc/rspamd/composites.conf
etc/rspamd/groups.conf
etc/rspamd/logging.inc
2019-10-12 15:45:31 +00:00
etc/rspamd/maps.d/dmarc_whitelist.inc
etc/rspamd/maps.d/maillist.inc
etc/rspamd/maps.d/mid.inc
etc/rspamd/maps.d/mime_types.inc
etc/rspamd/maps.d/redirectors.inc
etc/rspamd/maps.d/spf_dkim_whitelist.inc
etc/rspamd/maps.d/surbl-whitelist.inc
2019-08-30 18:36:03 +00:00
etc/rspamd/metrics.conf
etc/rspamd/modules.conf
etc/rspamd/modules.d/antivirus.conf
etc/rspamd/modules.d/arc.conf
etc/rspamd/modules.d/asn.conf
etc/rspamd/modules.d/chartable.conf
etc/rspamd/modules.d/clickhouse.conf
etc/rspamd/modules.d/dcc.conf
etc/rspamd/modules.d/dkim.conf
etc/rspamd/modules.d/dkim_signing.conf
etc/rspamd/modules.d/dmarc.conf
etc/rspamd/modules.d/elastic.conf
etc/rspamd/modules.d/emails.conf
etc/rspamd/modules.d/external_services.conf
etc/rspamd/modules.d/force_actions.conf
etc/rspamd/modules.d/forged_recipients.conf
etc/rspamd/modules.d/fuzzy_check.conf
etc/rspamd/modules.d/greylist.conf
etc/rspamd/modules.d/hfilter.conf
etc/rspamd/modules.d/history_redis.conf
2021-01-09 15:21:24 +00:00
etc/rspamd/modules.d/http_headers.conf
2023-10-14 14:57:38 +00:00
etc/rspamd/modules.d/known_senders.conf
2019-08-30 18:36:03 +00:00
etc/rspamd/modules.d/maillist.conf
etc/rspamd/modules.d/metadata_exporter.conf
etc/rspamd/modules.d/metric_exporter.conf
etc/rspamd/modules.d/mid.conf
etc/rspamd/modules.d/milter_headers.conf
etc/rspamd/modules.d/mime_types.conf
etc/rspamd/modules.d/multimap.conf
etc/rspamd/modules.d/mx_check.conf
etc/rspamd/modules.d/neural.conf
etc/rspamd/modules.d/once_received.conf
2019-10-12 15:45:31 +00:00
etc/rspamd/modules.d/p0f.conf
2019-08-30 18:36:03 +00:00
etc/rspamd/modules.d/phishing.conf
etc/rspamd/modules.d/ratelimit.conf
etc/rspamd/modules.d/rbl.conf
etc/rspamd/modules.d/redis.conf
etc/rspamd/modules.d/regexp.conf
etc/rspamd/modules.d/replies.conf
etc/rspamd/modules.d/reputation.conf
etc/rspamd/modules.d/rspamd_update.conf
etc/rspamd/modules.d/spamassassin.conf
etc/rspamd/modules.d/spamtrap.conf
etc/rspamd/modules.d/spf.conf
etc/rspamd/modules.d/surbl.conf
etc/rspamd/modules.d/trie.conf
etc/rspamd/modules.d/url_redirector.conf
etc/rspamd/modules.d/whitelist.conf
etc/rspamd/options.inc
etc/rspamd/rspamd.conf
etc/rspamd/scores.d/fuzzy_group.conf
etc/rspamd/scores.d/headers_group.conf
etc/rspamd/scores.d/hfilter_group.conf
etc/rspamd/scores.d/mime_types_group.conf
etc/rspamd/scores.d/mua_group.conf
etc/rspamd/scores.d/phishing_group.conf
etc/rspamd/scores.d/policies_group.conf
etc/rspamd/scores.d/rbl_group.conf
etc/rspamd/scores.d/statistics_group.conf
etc/rspamd/scores.d/subject_group.conf
etc/rspamd/scores.d/surbl_group.conf
etc/rspamd/scores.d/whitelist_group.conf
etc/rspamd/settings.conf
etc/rspamd/statistic.conf
etc/rspamd/worker-controller.inc
etc/rspamd/worker-fuzzy.inc
etc/rspamd/worker-normal.inc
etc/rspamd/worker-proxy.inc
)
install=rspamd.install
2023-12-21 02:20:03 +00:00
_tag=8c86c16763af854f19f2fb6eae289814feab8f28
2019-08-30 18:36:03 +00:00
source=(
2020-10-01 14:11:33 +00:00
git+https://github.com/rspamd/rspamd.git#tag=${_tag}
2019-08-30 18:36:03 +00:00
rspamd.tmpfiles
rspamd.sysusers
rspamd.logrotate
2022-01-19 13:55:00 +00:00
rspamd-dmarc-report.service
rspamd-dmarc-report.timer
2023-05-14 15:36:52 +00:00
rspamd-hyperscan.hook
2019-10-12 15:45:31 +00:00
)
2020-10-01 14:11:33 +00:00
b2sums=('SKIP'
'6b1b4220444d382d01fe981acf51580c397363a873507fdb508fd5109adae2609c03e629ecdd6e48c13f068d0c3530be4d0fb55b3084c33522619dd29f70a40c'
'5b4db27d87158609519bb0e59700ac627d447e4627b70600a70638f81a39361ad416c4784dafc392e9f9bc7b69211587ae64cbab7bec98668e75df5c4fba46ea'
2022-01-19 13:55:00 +00:00
'25c2253c7ecd9fba215cb6a1df93d76fab98e98ffeec380f828d7a612a78e0c4822dacc838ca37c2ceec452e54e7fc06c4c4df3290c8a6e8ee5ae869bbbb449e'
'e22421badb8d8b69ec5b5e2cc42edcae3b83725a783455bfef7c9f4fe3b1797981a793d09f281b22b1423376a2f09dce368a354941aaf7f2d3c3a2e56e14392b'
2023-05-14 15:36:52 +00:00
'153df613fc1b24e845b3a86026215f8f7e031cc52f47278a1e0f389d6225d017c53e806316c8eb7d7e755985451f09cc9fb366cd776f3786e04ac4c59eacf606'
2023-12-22 01:35:46 +00:00
'8a2882e4cd59eb3304acae9dfa71252c2024a8251e61cd1e75e6b84a84ec8c636e70d6702c03d7b7d0e2f7fa60d2466c6eed4f4f80f1834585185deaf7157eee')
2019-10-12 15:45:31 +00:00
pkgver() {
cd rspamd
git describe --tags
}
2019-08-30 18:36:03 +00:00
prepare() {
cd rspamd
sed 's/_rspamd/rspamd/g' -i rspamd.service
}
build() {
2020-10-01 14:11:33 +00:00
cmake -S rspamd -B build -G Ninja \
2019-08-30 18:36:03 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCONFDIR=/etc/rspamd \
-DDBDIR=/var/lib/rspamd \
-DLOGDIR=/var/log/rspamd \
-DRUNDIR=/run/rspamd \
-DRSPAMD_USER=rspamd \
-DNO_SHARED=ON \
-DWANT_SYSTEMD_UNITS=ON \
2019-11-21 00:58:47 +00:00
-DENABLE_HYPERSCAN=OFF \
-DENABLE_JEMALLOC=ON \
2020-10-01 14:11:33 +00:00
-DENABLE_OPTIMIZATION=ON \
-DENABLE_LTO=OFF
2020-02-11 13:42:35 +00:00
cmake --build build
2019-08-30 18:36:03 +00:00
}
package() {
2022-01-19 13:55:00 +00:00
DESTDIR="${pkgdir}" cmake --install build
2020-02-11 13:42:35 +00:00
install -Dm 644 rspamd/LICENSE.md -t "${pkgdir}"/usr/share/licenses/rspamd
install -Dm 644 rspamd.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/rspamd.conf
install -Dm 644 rspamd.sysusers "${pkgdir}"/usr/lib/sysusers.d/rspamd.conf
install -Dm 644 rspamd.logrotate "${pkgdir}"/etc/logrotate.d/rspamd
2022-01-19 13:55:00 +00:00
install -Dm 644 rspamd-dmarc-report.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm 644 rspamd-dmarc-report.timer -t "${pkgdir}"/usr/lib/systemd/system/
2023-05-14 15:36:52 +00:00
install -Dm 644 rspamd-hyperscan.hook -t "${pkgdir}"/usr/share/libalpm/hooks/
2019-08-30 18:36:03 +00:00
}
2020-02-11 13:42:35 +00:00
# vim: ts=2 sw=2 et: