void-packages/srcpkgs/redis/template
2017-02-01 09:40:02 +00:00

36 lines
945 B
Bash

# Template file for 'redis'
pkgname=redis
version=3.2.7
revision=1
makedepends="jemalloc-devel"
homepage="http://redis.io"
distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
short_desc="Advanced key-value store"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="BSD"
checksum=bf9df3e5374bfe7bfc3386380f9df13d94990011504ef07632b3609bb2836fa9
system_accounts="redis"
redis_homedir="/var/lib/redis"
conf_files="/etc/redis/redis.conf"
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() {
case "$XBPS_TARGET_MACHINE" in
*-musl) _malloc="none";;
*) _malloc="jemalloc";;
esac
make CC=$CC CFLAGS="$CFLAGS" MALLOC=${_malloc} ${makejobs}
}
do_install() {
make INSTALL_BIN=${DESTDIR}/usr/bin PREFIX=/usr install
vlicense COPYING
vinstall redis.conf 644 etc/redis
vsv redis
}