aboutsummaryrefslogtreecommitdiffstats
path: root/main/redis/APKBUILD
blob: dfb221f2079dadbd5b4913663b8c25a3029b4485 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=redis
pkgver=4.0.9
pkgrel=1
pkgdesc="Advanced key-value store"
url="https://redis.io/"
arch="all"
license="BSD-3-Clause"
pkgusers="redis"
pkggroups="redis"
makedepends="linux-headers"
checkdepends="tcl procps"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="http://download.redis.io/releases/$pkgname-$pkgver.tar.gz
	redis.conf.patch
	$pkgname.initd
	$pkgname.logrotate
	$pkgname.confd
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	cd "$builddir"

	# disable broken tests
	# see: https://github.com/antirez/redis/issues/2814
	#      https://github.com/antirez/redis/issues/3810
	sed -i -e '/integration\/aof/d' \
		-e '/integration\/logging/d' \
		tests/test_helper.tcl
}

build() {
	cd "$builddir"
	make PREFIX=/usr \
		INSTALL_BIN="$pkgdir"/usr/bin \
		MALLOC=libc \
		all
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"

	make install PREFIX=/usr INSTALL_BIN="$pkgdir/usr/bin"

	cd "$pkgdir"

	install -D -m 644 "$builddir"/redis.conf etc/redis.conf

	install -D -m 755 "$srcdir"/redis.initd etc/init.d/redis
	install -D -m 644 "$srcdir"/redis.confd etc/conf.d/redis
	install -D -m 644 "$srcdir"/redis.logrotate etc/logrotate.d/redis

	install -d -o redis -g redis \
		var/lib/redis \
		var/log/redis
}

sha512sums="a6cf63cb361f0a87da3955ba628190dc04cad342f7a664d18e44416ee67dd86ed6e3a46b9701e994f1417e56b819b3c6fc595f363c10bb4b83d5033919d29598  redis-4.0.9.tar.gz
c8a35e3c30be99fef8678acb2502f424bcca478dcc1ef1750f8c8c8e9e9c462f97586159f32ebba84b6a4eb398a9d568e3200241fb0de1f96293c9fdaafb06c9  redis.conf.patch
a56fdf8ac3f649ae1fa74005158be7d758a670ea02224519bc0000e7ce78e0c0f65a6166ced028f558461d03eba377fa37437d5e610b5ec3ed005d9e62eae25b  redis.initd
6d17d169b40a7e23a0a2894eff0f3e2fe8e4461b36f2a9d45468f0abd84ea1035d679b4c0a34029bce093147f9c7bb697e843c113c17769d38c934d4a78a5848  redis.logrotate
6752e99df632b14d62a3266929e80c3d667be5c270e4f34e0dcf2b7f9b1754fe0ce9d4569fa413dbbe207e406ff2848a64e0c47629997536ae1d14ca84ebd56b  redis.confd"