summaryrefslogtreecommitdiffstats
path: root/testing/redis/APKBUILD
blob: 6321569a5666a5e5401255fce65638b3438797ad (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
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=redis
pkgver=2.4.14
pkgrel=0
pkgdesc="Advanced key-value store"
url="http://redis.googlecode.com"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends=""
install=""
subpackages=""
pkgusers="redis"
pkggroups="redis"
source="http://redis.googlecode.com/files/$pkgname-$pkgver.tar.gz
        redis.initd
        redis.logrotate
        redis.confd"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
}

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

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/bin
	
	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
        sed -i -e 's|daemonize no|daemonize yes|' \
		-e 's|dir \./|dir /var/lib/redis/|' \
		-e 's|logfile stdout|logfile /var/log/redis.log|' \
		$_builddir/redis.conf || return 1
        install -D -m644 "$_builddir/redis.conf" "$pkgdir/etc/redis.conf" \
		|| retrun 1

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


md5sums="1bc8f833b955ef119d643da08084433f  redis-2.4.14.tar.gz
9aee4f445f4f6fcbc4475691f12e62af  redis.initd
9e2d75b7a9dc421122d673fe520ef17f  redis.logrotate
91c1be756ef41ab3a47a3573100bb335  redis.confd"