48 lines
1.2 KiB
Bash
48 lines
1.2 KiB
Bash
# Template file for 'redis'
|
|
pkgname=redis
|
|
version=7.0.5
|
|
revision=1
|
|
makedepends="jemalloc-devel libatomic-devel"
|
|
checkdepends="pkg-config procps-ng tcl-devel which"
|
|
short_desc="Advanced key-value store"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://redis.io"
|
|
changelog="https://raw.githubusercontent.com/antirez/redis/${version%.*}/00-RELEASENOTES"
|
|
distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
|
|
checksum=67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3
|
|
|
|
system_accounts="redis"
|
|
redis_homedir="/var/lib/redis"
|
|
conf_files="/etc/redis/redis.conf"
|
|
|
|
make_dirs="/var/lib/redis 0700 redis redis"
|
|
|
|
do_configure() {
|
|
vsed -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
|
|
vsed -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
|
|
}
|