void-packages/srcpkgs/redis/template
maxice8 be328d5d91
redis: update to 4.0.10.
Closes #29.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
2018-06-17 09:13:52 +02:00

45 lines
1.2 KiB
Bash

# Template file for 'redis'
pkgname=redis
version=4.0.10
revision=1
makedepends="jemalloc-devel libatomic-devel"
checkdepends="tcl-devel"
short_desc="Advanced key-value store"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="BSD-3-Clause"
homepage="https://redis.io"
#changelog="https://raw.githubusercontent.com/antirez/redis/4.0/00-RELEASENOTES"
distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
checksum=1db67435a704f8d18aec9b9637b373c34aa233d65b6e174bdac4c1b161f38ca4
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
sed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
}
do_build() {
case "$XBPS_TARGET_MACHINE" in
*-musl) _malloc="none";;
*) _malloc="jemalloc";;
esac
make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" V=1 MALLOC=${_malloc} ${makejobs}
}
do_check() {
make test
}
do_install() {
make INSTALL_BIN=${DESTDIR}/usr/bin PREFIX=/usr install
vlicense COPYING
vinstall redis.conf 644 etc/redis
vsv redis
}