Subject: [alpine-aports] [PATCH] testing/rspamd: upgrade to 1.5.6

From: Valery Kartel <[email-masked]>
Date: Tue, 25 Apr 2017 11:43:27 +0300

fixes in APKBUILD
---
 testing/rspamd/APKBUILD | 53 ++++++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/testing/rspamd/APKBUILD b/testing/rspamd/APKBUILD
index 8627acbef6..bd40cf567e 100644
--- a/testing/rspamd/APKBUILD
+++ b/testing/rspamd/APKBUILD
@@ -2,22 +2,21 @@
 # Contributor: Valery Kartel <[email-masked]>
 # Contributor: Nathan Angelacos <[email-masked]>
 pkgname=rspamd
-pkgver=1.5.0
-pkgrel=1
+pkgver=1.5.6
+pkgrel=0
 pkgdesc="Fast, free and open-source spam filtering system"
 url="https://rspamd.com"
 arch="x86_64 x86 armhf"
 license="BSD"
-pkgusers="rspamd"
-pkggroups="rspamd"
-depends=""
+options="!check"
+pkgusers=$pkgname
+pkggroups=$pkgname
 makedepends="cmake ragel perl lua-dev glib-dev pcre-dev icu-dev
 	libevent-dev sqlite-dev libressl-dev file-dev curl-dev
 	gd-dev fann-dev"
 install="$pkgname.pre-install"
 subpackages="$pkgname-doc $pkgname-client $pkgname-utils::noarch
-	$pkgname-controller::noarch
-	$pkgname-fuzzy::noarch
+	$pkgname-controller::noarch $pkgname-fuzzy::noarch
 	"
 source="https://rspamd.com/downloads/$pkgname-$pkgver.tar.xz
 	$pkgname.logrotated
@@ -40,7 +39,10 @@ prepare() {
 	sed "$(grep -n -m1 'worker {' conf/rspamd.sysvinit.conf|cut -d: -f1),\$d" \
 		 -i conf/rspamd.sysvinit.conf && \
 		 echo '.include(glob=true) "$CONFDIR/worker-*.conf"' >> \
-		conf/rspamd.sysvinit.conf
+		conf/rspamd.sysvinit.conf || return 1
+	sed -ri -e 's~DBDIR(/rspamd.sock)~RUNDIR\1~' \
+		-e 's~rspamd_dynamic~dynamic~' \
+		conf/options.inc
 }
 
 build() {
@@ -68,27 +70,32 @@ package() {
 	rm "$pkgdir"/etc/$pkgname/$pkgname.systemd.conf || return 1
 	mv "$pkgdir"/etc/$pkgname/$pkgname.sysvinit.conf \
 		"$pkgdir"/etc/$pkgname/$pkgname.conf || return 1
-	sed -ri -e 's~DBDIR(/rspamd.sock)~RUNDIR\1~' \
-		-e 's~rspamd_dynamic~dynamic~' \
-		"$pkgdir"/etc/$pkgname/options.inc || return 1
 
 	mkdir -p "$pkgdir"/etc/$pkgname/local.d \
 		"$pkgdir"/etc/$pkgname/override.d || return 1
 
-	install -Dm644 "$srcdir"/$pkgname.logrotated "$pkgdir"/etc/logrotate.d/$pkgname
-	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
-	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+	install -Dm644 "$srcdir"/$pkgname.logrotated \
+		"$pkgdir"/etc/logrotate.d/$pkgname || return 1
+	install -Dm755 "$srcdir"/$pkgname.initd \
+		"$pkgdir"/etc/init.d/$pkgname || return 1
+	install -Dm644 "$srcdir"/$pkgname.confd \
+		"$pkgdir"/etc/conf.d/$pkgname || return 1
 
-	install -dm750 -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/$pkgname/dynamic
-	install -dm750 -g $pkggroups "$pkgdir"/var/log/$pkgname
-	chown $pkgusers "$pkgdir"/var/lib/$pkgname
+	install -dm750 -o $pkgname -g $pkgname \
+		"$pkgdir"/var/lib/$pkgname/dynamic || return 1
+	install -dm750 -g $pkgname \
+		"$pkgdir"/var/log/$pkgname || return 1
+	chown $pkgname:$pkgname "$pkgdir"/var/lib/$pkgname || return 1
 
-	mkdir "$pkgdir"/usr/sbin
-	find "$pkgdir"/usr/bin -type l -delete
-	mv "$pkgdir"/usr/bin/rspamd-$pkgver "$pkgdir"/usr/sbin/rspamd
-	mv "$pkgdir"/usr/bin/rspamadm-$pkgver "$pkgdir"/usr/bin/rspamadm
+	mkdir "$pkgdir"/usr/sbin || return 1
+	find "$pkgdir"/usr/bin -type l -delete || return 1
+	mv "$pkgdir"/usr/bin/rspamd-$pkgver \
+		"$pkgdir"/usr/sbin/rspamd || return 1
+	mv "$pkgdir"/usr/bin/rspamadm-$pkgver \
+		"$pkgdir"/usr/bin/rspamadm || return 1
 
-	mv "$pkgdir"/usr/share/examples "$pkgdir"/usr/share/doc
+	mv "$pkgdir"/usr/share/examples \
+		"$pkgdir"/usr/share/doc || return 1
 	mv "$pkgdir"/usr/share/$pkgname/www/README.md \
 		"$pkgdir"/usr/share/$pkgname/www/plugins.txt \
 		"$pkgdir"/usr/share/doc/$pkgname
@@ -132,7 +139,7 @@ controller() {
 		"$subpkgdir"/etc/$pkgname
 }
 
-sha512sums="b1a7342feb43757d9e3ac4f27c09b0145aa6a33c7517881fd618d7dfb8cac7f091405b90466fa46b4dcd9744a7f767c2fa6010a31a669f52c01a4dbb7b1249b9  rspamd-1.5.0.tar.xz
+sha512sums="3735052817ecd12d46505e4657456a01cde6aac25d7bdffaf0c8722458c674edbe89aeb589f338ec9ed22b5455314511fe1f55b5a0be3532761579b4f7b44cfa  rspamd-1.5.6.tar.xz
 2efe28575c40d1fba84b189bb872860e744400db80dce2f6330be6c6287fb3f46e6511284729b957488bf40bcb9b0952e26df9934f5f138334bd2766075c45cb  rspamd.logrotated
 df37726d03e676b16d707854d95bafc9162da65c27bb150edbfc0cb00f1842188a1f2a8f1b82be5ae2a253b4f4db4d93dfe804a89feb988b5af858eb3f3458be  rspamd.initd
 e417dd825d1b4d03d115db037b2fdf2f48a35420ee7a9010d97167b6c31e88d6c0a15dd33b21d7d76856db0fdc5097c922fcdf1d8164d1e92ae377f7c5303947  rspamd.confd
-- 
2.12.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---