41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
# Template file for 'redis'
|
|
pkgname=redis
|
|
version=4.0.6
|
|
revision=1
|
|
makedepends="libatomic-devel jemalloc-devel"
|
|
checkdepends="tcl-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=769b5d69ec237c3e0481a262ff5306ce30db9b5c8ceb14d1023491ca7be5f6fa
|
|
|
|
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
|
|
}
|