aboutsummaryrefslogtreecommitdiffstats
path: root/testing/redis/APKBUILD
blob: 5c193b3efd6188686ec7a0a13b91354bed02fb82 (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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=redis
pkgver=2.6.16
pkgrel=0
pkgdesc="Advanced key-value store"
url="http://redis.io/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="jemalloc-dev"
install="redis.pre-install"
subpackages=""
pkgusers="redis"
pkggroups="redis"
source="http://download.redis.io/releases/$pkgname-$pkgver.tar.gz
		redis.initd
		redis.logrotate
		redis.confd
		redis-unbundle-jemalloc.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p2 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i -e 's|^daemonize .*|daemonize yes|' \
		-e 's|^dir .*|dir /var/lib/redis/|' \
		-e 's|^logfile .*|logfile /var/log/redis/redis\.log|' \
		-e 's|^pidfile .*|pidfile /var/run/redis/redis\.pid|' \
		-e 's|^loglevel .*|loglevel notice|' \
		redis.conf || return 1
}

build() {
	cd "$_builddir"
	export CFLAGS="$CFLAGS -std=c99" 
	make PREFIX=/usr \
		INSTALL_BIN="$pkgdir"/usr/bin \
		FORCE_LIBC_MALLOC=yes \
		all || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/bin
	install -d -o redis -g redis \
		"$pkgdir"/var/lib/redis \
		"$pkgdir"/var/log/redis \
		"$pkgdir"/var/run/redis \
		|| return 1
	
	install -D -m755 "$_builddir/COPYING" \
		"$pkgdir/usr/share/licenses/redis/COPYING" || return 1
        install -D -m755 "$srcdir/redis.initd" "$pkgdir/etc/init.d/redis" \
		&& install -Dm644 "$srcdir/redis.logrotate" \
			"$pkgdir/etc/logrotate.d/redis" \
		&& install -Dm644 "$srcdir/redis.confd" \
			"$pkgdir/etc/conf.d/redis" \
		|| return 1
        install -D -m644 "$_builddir/redis.conf" "$pkgdir/etc/redis.conf" \
		|| retrun 1

	make PREFIX=/usr \
		INSTALL_BIN="$pkgdir/usr/bin" \
		FORCE_LIBC_MALLOC=yes \
		install || return 1
}


md5sums="ca1b81bd56fe0c5e2c8ec443a95c908d  redis-2.6.16.tar.gz
7fb0daf8dcfcda6fd6291dc0291ce579  redis.initd
f49b80f4418f456dbf865a32443d4d1d  redis.logrotate
bf204d560e41b854297c60aff8d862d5  redis.confd
a8c70ad9cc2633f87ac44eb78a1f6de9  redis-unbundle-jemalloc.patch"
sha256sums="81490918dcf82d124b36e48b0a9911bfba3f13abba04d8c89820324eff7df03a  redis-2.6.16.tar.gz
527c5200ac9bb7862ce048f728ca6a8091dc8efdabe8f4e81145212738ae3472  redis.initd
197d9b212eec3b8cd33878ba224f9a79b6f98a43c0663caf7e084c7969beb3f9  redis.logrotate
97d50b2bee2df995317b505d459c31fe4abe74e670028f0335febdd6e4e31486  redis.confd
ebc7cd565a9b5476d0211e6bf86840aa2bd2b73f995608743affc3e1c1dad982  redis-unbundle-jemalloc.patch"
sha512sums="469a29e2a755543a3b2c3deb467a72ae62b81c54a60ed1baf6f9d5687ef4b87c22d9cec6a43cec43dd90d4b5561f5bbcd2448f6edf8a784041233b80d9403b0b  redis-2.6.16.tar.gz
cc5645e864aea72c247baf3fe344378e906392bec03b571280229fcc88698298a7574a7980ea8eead8626fa6b83ff3fac61abd8967f3dc35fb833c9a380d0bd1  redis.initd
706cfedb7fb320649c7ad02845d7477b85ce1e5d9dced39b938c6f754e6e9eb666e22f6eddc4cbffa3f63a1f6fb6f3221244e5bcd8fa92706c256aa1fe50ff41  redis.logrotate
d87aad6185300c99cc9b6a478c83bf62c450fb2c225592d74cc43a3adb93e19d8d2a42cc279907b385aa73a7b9c77b66828dbfb001009edc16a604abb2087e99  redis.confd
743810a1d6224b8ebd5443f3db4bd4df863ac3c969862bc347b42489edce90a2699e5dca85eedc53db471d578e3a22dc806ee14cba1f5d261561a7c77a25388e  redis-unbundle-jemalloc.patch"