diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-04 12:49:51 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-04 12:52:59 +0000 |
commit | 728a7325eb258309ecc3213e5b7ec873cbe2e937 (patch) | |
tree | 7f1ebf2e7f90fbcd7de45b4736cc49579f0ae321 /testing/redis/APKBUILD | |
parent | a121333ef7dfcfe2a27fc85d787e26aae1c63df6 (diff) | |
download | aports-728a7325eb258309ecc3213e5b7ec873cbe2e937.tar.bz2 aports-728a7325eb258309ecc3213e5b7ec873cbe2e937.tar.xz |
testing/redis: various fixes
- avoid building linenoise at install time
- set loglevel to 'notice' by default
- set default log and pidfiles in redis subdir with permissions
- create redis user at pre-install
- fix init.d script to read pid, log and dir from redis.conf
- remove unnneded vars from conf.d
Diffstat (limited to 'testing/redis/APKBUILD')
-rw-r--r-- | testing/redis/APKBUILD | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/testing/redis/APKBUILD b/testing/redis/APKBUILD index 6321569a56..e0e0e908c6 100644 --- a/testing/redis/APKBUILD +++ b/testing/redis/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=redis pkgver=2.4.14 -pkgrel=0 +pkgrel=1 pkgdesc="Advanced key-value store" url="http://redis.googlecode.com" arch="all" @@ -10,7 +10,7 @@ license="BSD" depends="" depends_dev="" makedepends="" -install="" +install="redis.pre-install" subpackages="" pkgusers="redis" pkggroups="redis" @@ -22,18 +22,31 @@ source="http://redis.googlecode.com/files/$pkgname-$pkgver.tar.gz _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" + 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 || return 1 + 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 @@ -43,18 +56,17 @@ package() { && 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 + make PREFIX=/usr \ + INSTALL_BIN="$pkgdir/usr/bin" \ + FORCE_LIBC_MALLOC=yes \ + install || return 1 } md5sums="1bc8f833b955ef119d643da08084433f redis-2.4.14.tar.gz -9aee4f445f4f6fcbc4475691f12e62af redis.initd +7fb0daf8dcfcda6fd6291dc0291ce579 redis.initd 9e2d75b7a9dc421122d673fe520ef17f redis.logrotate -91c1be756ef41ab3a47a3573100bb335 redis.confd" +bf204d560e41b854297c60aff8d862d5 redis.confd" |