diff options
Diffstat (limited to 'community/redis')
-rw-r--r-- | community/redis/PKGBUILD | 40 | ||||
-rw-r--r-- | community/redis/redis.logrotate | 5 | ||||
-rw-r--r-- | community/redis/redis.service | 14 |
3 files changed, 59 insertions, 0 deletions
diff --git a/community/redis/PKGBUILD b/community/redis/PKGBUILD new file mode 100644 index 000000000..f4c813590 --- /dev/null +++ b/community/redis/PKGBUILD @@ -0,0 +1,40 @@ +# $Id: PKGBUILD 92955 2013-06-20 12:43:06Z 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.6.14 +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") +source=("http://redis.googlecode.com/files/${pkgname}-${pkgver}.tar.gz" + "redis.service" + "redis.logrotate") +md5sums=('02e0c06e953413017ff64862953e2756' + '5ab9fdb200e15c13b450fda77fa030b6' + '9e2d75b7a9dc421122d673fe520ef17f') + +build() { + cd "$srcdir/${pkgname}-${pkgver}" + make MALLOC=libc + sed -i 's|# bind 127.0.0.1|bind 127.0.0.1|' redis.conf +} + +package() { + cd "$srcdir/${pkgname}-${pkgver}" + mkdir -p $pkgdir/usr/bin + make INSTALL_BIN="$pkgdir/usr/bin" PREFIX=/usr install + + install -D -m755 "$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" + sed -i 's|daemonize no|daemonize yes|;s|dir \./|dir /var/lib/redis/|;s|logfile stdout|logfile /var/log/redis.log| ' $srcdir/${pkgname}-${pkgver}/redis.conf + install -D -m644 "$srcdir/${pkgname}-${pkgver}/redis.conf" "$pkgdir/etc/redis.conf" +} diff --git a/community/redis/redis.logrotate b/community/redis/redis.logrotate new file mode 100644 index 000000000..01d11422a --- /dev/null +++ b/community/redis/redis.logrotate @@ -0,0 +1,5 @@ +/var/log/redis.log { + notifempty + copytruncate + missingok +} diff --git a/community/redis/redis.service b/community/redis/redis.service new file mode 100644 index 000000000..7596b4bda --- /dev/null +++ b/community/redis/redis.service @@ -0,0 +1,14 @@ +[Unit] +Description=Advanced key-value store +After=network.target + +[Service] +Type=forking +PIDFile=/run/redis.pid +ExecStartPre=/bin/mkdir -p /var/lib/redis +ExecStart=/usr/bin/redis-server /etc/redis.conf +ExecStop=/usr/bin/redis-cli shutdown +Restart=always + +[Install] +WantedBy=multi-user.target |