blob: 5e9ef2b0c61ccb53022b32882aaed1fa4c0d8fb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hiredis
pkgver=0.14.0
pkgrel=2
pkgdesc="Minimalistic C client library for Redis"
url="https://github.com/redis/hiredis"
arch="all"
license="BSD-3-Clause"
checkdepends="redis"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz
musl-test.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
make PREFIX=/usr DEBUG="$CFLAGS" LDFLAGS="$LDFLAGS"
}
check() {
redis-server --dir "$builddir" --unixsocket "$builddir"/redis.sock&
local _redispid=$!
# make sure socket is available before we start running tests
local _n=100 # wait up to 10 sec
while ! [ -e "$builddir"/redis.sock ] && [ $_n -gt 0 ]; do
sleep 0.1s
_n=$(( $_n - 1))
done
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
4f33e8683ba27121f6d4711a2f94bc8b766b3de5095ee81ccef5b551c7d1d235ef0f75a5333706aebec35b4911391905124d6a843cbc4c48817e93c07ef20374 musl-test.patch"
|