aboutsummaryrefslogtreecommitdiffstats
path: root/main/hiredis/APKBUILD
blob: b9c055e71c24675e8e66b714f25afe65de4a4532 (plain) (blame)
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
# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hiredis
pkgver=0.14.0
pkgrel=1
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 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"