aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEivind Uggedal <eu@eju.no>2019-05-12 18:23:30 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-05-28 08:26:24 +0000
commitd6d486daf1ff324190b53e91943c8ed04862e722 (patch)
tree51ee6cdbfc50fab1275cd090befc8f4d554ff74f
parent91dc6d2e3a17625131ca1ed46eadba52d4224cb1 (diff)
downloadaports-d6d486daf1ff324190b53e91943c8ed04862e722.tar.gz
aports-d6d486daf1ff324190b53e91943c8ed04862e722.tar.bz2
aports-d6d486daf1ff324190b53e91943c8ed04862e722.tar.xz
main/hiredis: add check support, revbump
Also make license SPDX compliant.
-rw-r--r--main/hiredis/APKBUILD22
-rw-r--r--main/hiredis/musl-test.patch10
2 files changed, 27 insertions, 5 deletions
diff --git a/main/hiredis/APKBUILD b/main/hiredis/APKBUILD
index 31daf9b6b0..b9c055e71c 100644
--- a/main/hiredis/APKBUILD
+++ b/main/hiredis/APKBUILD
@@ -1,14 +1,16 @@
+# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hiredis
pkgver=0.14.0
-pkgrel=0
+pkgrel=1
pkgdesc="Minimalistic C client library for Redis"
url="https://github.com/redis/hiredis"
arch="all"
-license="BSD"
+license="BSD-3-Clause"
+checkdepends="redis"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
-options="!check" # check requires running redis server
+source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz
+ musl-test.patch"
builddir="$srcdir/$pkgname-$pkgver"
@@ -17,10 +19,20 @@ build() {
make PREFIX=/usr DEBUG="$CFLAGS" LDFLAGS="$LDFLAGS"
}
+check() {
+ redis-server --dir "$builddir" --unixsocket "$builddir"/redis.sock&
+ local _redispid=$!
+
+ make hiredis-test
+ ./hiredis-test -s "$builddir"/redis.sock || (kill $_redispid && false)
+ kill $_redispid
+}
+
package() {
cd "$builddir"
make PREFIX="$pkgdir"/usr install
}
-sha512sums="57a81a35b4750f0ca9dba830789483667f8ca1559f13b0ebdc3fab3e34ad16b2809f9734cf88157041263784e11447556b7a748bfb7ef318a60bb5dda3e358a0 hiredis-0.14.0.tar.gz"
+sha512sums="57a81a35b4750f0ca9dba830789483667f8ca1559f13b0ebdc3fab3e34ad16b2809f9734cf88157041263784e11447556b7a748bfb7ef318a60bb5dda3e358a0 hiredis-0.14.0.tar.gz
+4f33e8683ba27121f6d4711a2f94bc8b766b3de5095ee81ccef5b551c7d1d235ef0f75a5333706aebec35b4911391905124d6a843cbc4c48817e93c07ef20374 musl-test.patch"
diff --git a/main/hiredis/musl-test.patch b/main/hiredis/musl-test.patch
new file mode 100644
index 0000000000..37a7001396
--- /dev/null
+++ b/main/hiredis/musl-test.patch
@@ -0,0 +1,10 @@
+--- hiredis-0.14.0/test.c
++++ hiredis-0.14.0_p/test.c
+@@ -439,6 +439,7 @@
+ c = redisConnect((char*)"idontexist.test", 6379);
+ test_cond(c->err == REDIS_ERR_OTHER &&
+ (strcmp(c->errstr,"Name or service not known") == 0 ||
++ strcmp(c->errstr,"Name does not resolve") == 0 ||
+ strcmp(c->errstr,"Can't resolve: idontexist.test") == 0 ||
+ strcmp(c->errstr,"nodename nor servname provided, or not known") == 0 ||
+ strcmp(c->errstr,"No address associated with hostname") == 0 ||