New package: redis-2.8.7

This commit is contained in:
Enno Boland 2014-03-11 19:47:09 +01:00
parent fd67d08bad
commit 153f5126c1
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Advanced key-value store
After=network.target
[Service]
User=redis
PIDFile=/run/redis/redis.pid
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
Restart=always
[Install]
WantedBy=multi-user.target

36
srcpkgs/redis/template Normal file
View File

@ -0,0 +1,36 @@
# Template file for 'redis'
pkgname=redis
version=2.8.7
revision=1
homepage="http://redis.io"
distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
short_desc="advanced key-value store"
maintainer="Enno Boland <eb@s01.de>"
license="BSD"
checksum=a93e352e50bcc076e649174319c2a819306735c1a1ee83d498ced146eda78670
systemd_services="redis.service on"
system_accounts="redis"
redis_homedir="/var/lib/redis"
conf_files="/etc/redis/redis.conf"
make_dirs="
/var/lib/redis 0700 redis redis
/run/redis 0750 redis redis"
do_configure() {
sed -i \
-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
-e "s|^dir .*|dir ${redis_homedir}|" \
-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
}
do_build() {
make CC=$CC
}
do_install() {
make INSTALL_BIN="${DESTDIR}/usr/bin" PREFIX=/usr install
vinstall COPYING 644 "usr/share/licenses/redis"
vinstall "redis.conf" 644 "etc/redis"
vinstall "${FILESDIR}/redis.service" 644 "usr/lib/systemd/system"
}