summaryrefslogtreecommitdiff
path: root/community/redis/PKGBUILD
blob: e00b00d40dee3d1f0e30f52677df387ae9b1a577 (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
# $Id: PKGBUILD 103976 2014-01-14 11:37:21Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jan-Erik Rediger <badboy at archlinux dot us>
# Contributor: nofxx <x@<nick>.com>

pkgname=redis
pkgver=2.8.4
pkgrel=1
pkgdesc="Advanced key-value store"
arch=('i686' 'x86_64')
url="http://redis.io/"
license=('BSD')
depends=('bash')
makedepends=('gcc>=3.1' 'make' 'pkgconfig')
backup=("etc/redis.conf"
	"etc/logrotate.d/redis")
install=redis.install
source=("http://download.redis.io/releases/redis-$pkgver.tar.gz"
	"redis.service"
	"redis.logrotate"
	"redis.tmpfiles.d")
md5sums=('cc161dd8fc8a11727b1b2ad8db8f77a0'
         '5320aa6d0f31aadc1d6202ca40425aea'
         '9e2d75b7a9dc421122d673fe520ef17f'
         'dd9ab8022b4d963b2e5899170dfff490')

prepare() {
  cd "$srcdir/${pkgname}-${pkgver}"
  sed -i 's|# bind 127.0.0.1|bind 127.0.0.1|' redis.conf
  sed -i 's|daemonize no|daemonize yes|' redis.conf
  sed -i 's|dir \./|dir /var/lib/redis/|' redis.conf
  sed -i 's|pidfile .*|pidfile /run/redis/redis.pid|' redis.conf
  sed -i 's|logfile stdout|logfile /var/log/redis.log|' redis.conf
}

build() {
  cd "$srcdir/${pkgname}-${pkgver}"
  make
}

package() {
  cd "$srcdir/${pkgname}-${pkgver}"
  mkdir -p $pkgdir/usr/bin
  make INSTALL_BIN="$pkgdir/usr/bin" PREFIX=/usr install

  install -Dm755 "$srcdir/${pkgname}-${pkgver}/COPYING" "$pkgdir/usr/share/licenses/redis/COPYING"
  install -Dm644 "$srcdir"/redis.service "$pkgdir"/usr/lib/systemd/system/redis.service
  install -Dm644 "$srcdir/redis.logrotate" "$pkgdir/etc/logrotate.d/redis"
  install -Dm644 "$srcdir/${pkgname}-${pkgver}/redis.conf" "$pkgdir/etc/redis.conf"
  install -Dm644 "$srcdir/redis.tmpfiles.d" "$pkgdir/usr/lib/tmpfiles.d/redis.conf"
}