summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/libfann/PKGBUILD33
-rw-r--r--pcr/rspamd/PKGBUILD81
-rw-r--r--pcr/rspamd/rspamd.install16
-rw-r--r--pcr/rspamd/rspamd.sysuser1
-rw-r--r--pcr/rspamd/rspamd.tmpfile2
5 files changed, 98 insertions, 35 deletions
diff --git a/pcr/libfann/PKGBUILD b/pcr/libfann/PKGBUILD
new file mode 100644
index 000000000..6a8882596
--- /dev/null
+++ b/pcr/libfann/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Oleksandr Natalenko aka post-factum <oleksandr@natalenko.name>
+_origname=fann
+pkgname=lib${_origname}
+_fullrev=d71d54788bee56ba4cf7522801270152da5209d7
+_rev=d71d54788
+pkgver=2.2.0.${_rev}
+pkgrel=3
+pkgdesc="Fast Artificial Neural Network Library"
+url="https://github.com/${pkgname}/${_origname}"
+arch=('i686' 'x86_64')
+license=('LGPLv2.1')
+depends=('glibc')
+makedepends=('git' 'gcc' 'cmake' 'make' 'coreutils')
+source=(${pkgname}-${pkgver}.zip::https://github.com/${pkgname}/${_origname}/archive/${_fullrev}.zip)
+
+sha256sums=('a456c8703de30734317549ba26e7c574f56edbc7964d23f3ffe0bcd51c3297d6')
+
+build() {
+ cd "${srcdir}/${_origname}-${_fullrev}"
+
+ mkdir -p build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr ..
+
+ make -j$(nproc)
+}
+
+package() {
+ cd "${srcdir}/${_origname}-${_fullrev}/build"
+
+ make install
+}
+
diff --git a/pcr/rspamd/PKGBUILD b/pcr/rspamd/PKGBUILD
index 02b8df02a..ba53e5b2f 100644
--- a/pcr/rspamd/PKGBUILD
+++ b/pcr/rspamd/PKGBUILD
@@ -2,60 +2,90 @@
# Former maintainer: Andrew Lewis <nerf@judo.za.org>
# Maintainer (Parabola): fauno <fauno@parabola.nu>
pkgname=rspamd
-pkgver=1.2.8
+pkgver=1.5.6
pkgrel=1
epoch=
pkgdesc="Fast and free spam filtering system."
arch=('x86_64' 'i686' 'mips64el')
-url="http://rspamd.com"
+url="https://rspamd.com"
license=('Apache')
-depends=('libevent' 'glib2' 'gmime' 'luajit' 'sqlite' 'hiredis'
- 'jemalloc' 'pcre2')
-makedepends=('cmake' 'pkgconfig')
+depends=('libevent' 'glib2' 'gmime' 'lua' 'sqlite' 'lua-lpeg' 'libfann' 'gd'
+ 'jemalloc' 'hiredis' 'pcre2')
+makedepends=('cmake' 'pkgconfig' 'ragel')
backup=('etc/rspamd/2tld.inc'
'etc/rspamd/common.conf'
'etc/rspamd/composites.conf'
'etc/rspamd/dmarc_whitelist.inc'
'etc/rspamd/logging.inc'
+ 'etc/rspamd/maillist.inc'
'etc/rspamd/metrics.conf'
+ 'etc/rspamd/mid.inc'
'etc/rspamd/mime_types.inc'
'etc/rspamd/modules.conf'
- 'etc/rspamd/options.inc'
- 'etc/rspamd/rspamd.conf'
- 'etc/rspamd/rspamd.systemd.conf'
- 'etc/rspamd/rspamd.sysvinit.conf'
- 'etc/rspamd/spf_dkim_whitelist.inc'
- 'etc/rspamd/statistic.conf'
- 'etc/rspamd/surbl-whitelist.inc'
- 'etc/rspamd/worker-controller.inc'
- 'etc/rspamd/worker-normal.inc'
+ 'etc/rspamd/modules.d/antivirus.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/emails.conf'
+ 'etc/rspamd/modules.d/fann_redis.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'
'etc/rspamd/modules.d/ip_score.conf'
'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/mime_types.conf'
'etc/rspamd/modules.d/multimap.conf'
+ 'etc/rspamd/modules.d/mx_check.conf'
'etc/rspamd/modules.d/once_received.conf'
'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/rmilter_headers.conf'
'etc/rspamd/modules.d/rspamd_update.conf'
+ 'etc/rspamd/modules.d/spamassassin.conf'
'etc/rspamd/modules.d/spf.conf'
'etc/rspamd/modules.d/surbl.conf'
- 'etc/rspamd/modules.d/whitelist.conf')
+ 'etc/rspamd/modules.d/trie.conf'
+ 'etc/rspamd/modules.d/url_redirector.conf'
+ 'etc/rspamd/modules.d/url_reputation.conf'
+ 'etc/rspamd/modules.d/url_tags.conf'
+ 'etc/rspamd/modules.d/whitelist.conf'
+ 'etc/rspamd/options.inc'
+ 'etc/rspamd/redirectors.inc'
+ 'etc/rspamd/rspamd.conf'
+ 'etc/rspamd/rspamd.systemd.conf'
+ 'etc/rspamd/rspamd.sysvinit.conf'
+ 'etc/rspamd/spf_dkim_whitelist.inc'
+ 'etc/rspamd/statistic.conf'
+ 'etc/rspamd/surbl-whitelist.inc'
+ 'etc/rspamd/worker-controller.inc'
+ 'etc/rspamd/worker-fuzzy.inc'
+ 'etc/rspamd/worker-normal.inc')
-install=rspamd.install
+install="rspamd.install"
-source=("https://www.rspamd.com/downloads/${pkgname}-${pkgver}.tar.xz")
+source=("https://www.rspamd.com/downloads/${pkgname}-${pkgver}.tar.xz"
+ "${pkgname}.tmpfile"
+ "${pkgname}.sysuser"
+ )
-sha256sums=('485438d8c38ada1a6e95c9ea1298d2c899d4ec618f1dd5f539663522c506eb2b')
+sha256sums=('cda2a5b93f0e57b890767514ce00a2660baf9d48627f7367a36fe938ade14f31'
+ 'f89edae5436a3c14e58210fb5c1d5bdd2f8a6f98c03dbc150ea9ff1a3fcfe441'
+ '59646874a5036f3f26cac2898a2f60713fe6147b3c60ee964494f07b6acc313f')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -75,11 +105,11 @@ build() {
-DRSPAMD_USER='_rspamd' \
-DDBDIR=/var/lib/rspamd \
-DWANT_SYSTEMD_UNITS=ON \
- -DENABLE_HIREDIS=ON \
- -DENABLE_SYSTEM_HIREDIS=ON \
- -DENABLE_PCRE2=ON \
- -DENABLE_JEMALLOC=ON \
- -DINSTALL_WEBUI=ON \
+ -DENABLE_HIREDIS=ON \
+ -DENABLE_SYSTEM_HIREDIS=ON \
+ -DENABLE_PCRE2=ON \
+ -DENABLE_JEMALLOC=ON \
+ -DINSTALL_WEBUI=ON \
.
make -j$(nproc)
@@ -88,5 +118,10 @@ build() {
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" install
+
+ install -Dm0644 "LICENSE" "${pkgdir}/usr/share/${pkgname}/LICENSE"
+ install -Dm0644 "../${pkgname}.tmpfile" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ install -Dm0644 "../${pkgname}.sysuser" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
}
+# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab
diff --git a/pcr/rspamd/rspamd.install b/pcr/rspamd/rspamd.install
index 2261599e8..705c21dbe 100644
--- a/pcr/rspamd/rspamd.install
+++ b/pcr/rspamd/rspamd.install
@@ -1,20 +1,12 @@
## arg 1: the new package version
post_install() {
- if ! getent passwd _rspamd >/dev/null; then
- useradd -k /dev/null -r -m -c 'rspam daemon' -d /var/lib/rspamd -s /sbin/nologin _rspamd
- passwd -l _rspamd >/dev/null
- fi
- mkdir -p /var/log/rspamd
- mkdir -p /run/rspamd
- chown _rspamd:_rspamd /var/log/rspamd
- chown _rspamd:_rspamd /run/rspamd
+ systemd-sysusers rspamd.conf
+ systemd-tmpfiles --create rspamd.conf
}
## arg 1: the old package version
post_remove() {
- if getent passwd _rspamd >/dev/null; then
- userdel _rspamd
- fi
+ true
}
-# vim:set ts=2 sw=2 et:
+# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab
diff --git a/pcr/rspamd/rspamd.sysuser b/pcr/rspamd/rspamd.sysuser
new file mode 100644
index 000000000..0beda9439
--- /dev/null
+++ b/pcr/rspamd/rspamd.sysuser
@@ -0,0 +1 @@
+u _rspamd /var/lib/rspamd "rspam daemon" /var/lib/rspamd
diff --git a/pcr/rspamd/rspamd.tmpfile b/pcr/rspamd/rspamd.tmpfile
new file mode 100644
index 000000000..3fe6e9ad0
--- /dev/null
+++ b/pcr/rspamd/rspamd.tmpfile
@@ -0,0 +1,2 @@
+d /run/rspamd 0755 _rspamd _rspamd -
+d /var/log/rspamd 0755 _rspamd _rspamd -