From 153f5126c1d6aeb28fa000cfc0a50c35a670c9bf Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 11 Mar 2014 19:47:09 +0100 Subject: [PATCH] New package: redis-2.8.7 --- srcpkgs/redis/files/redis.service | 12 +++++++++++ srcpkgs/redis/template | 36 +++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 srcpkgs/redis/files/redis.service create mode 100644 srcpkgs/redis/template diff --git a/srcpkgs/redis/files/redis.service b/srcpkgs/redis/files/redis.service new file mode 100644 index 0000000000..876a1baf55 --- /dev/null +++ b/srcpkgs/redis/files/redis.service @@ -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 diff --git a/srcpkgs/redis/template b/srcpkgs/redis/template new file mode 100644 index 0000000000..5ff269ca1b --- /dev/null +++ b/srcpkgs/redis/template @@ -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 " +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" +}