Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions srcpkgs/redis/patches/use-system-jemalloc.patch

This file was deleted.

29 changes: 17 additions & 12 deletions srcpkgs/redis/template
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Template file for 'redis'
pkgname=redis
version=7.0.8
revision=2
version=8.8.2
revision=1
build_style=gnu-makefile
make_build_args="V=1"
# redis makefile sets gcc to link, Void build points to ld
# https://github.com/redis/redis/blob/669b2a1316f5b35ecf964281b77c054ff28dc934/tests/modules/Makefile#L32
make_build_args="V=1 LD=$CC"
make_check_target="test"
checkdepends="pkg-config procps-ng tcl-devel which"
short_desc="Advanced key-value store"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
license="AGPL-3.0-only OR custom:RSALv2"
homepage="https://redis.io"
changelog="https://raw.githubusercontent.com/redis/redis/${version%.*}/00-RELEASENOTES"
distfiles="http://download.redis.io/releases/redis-${version}.tar.gz"
checksum=06a339e491306783dcf55b97f15a5dbcbdc01ccbde6dc23027c475cab735e914
checksum=328ccd441d5ef22e00c81cbcd088007887fdfd2fabb32c663998f29033acdb25

system_accounts="redis"
redis_homedir="/var/lib/redis"
Expand All @@ -22,23 +24,26 @@ make_dirs="
/var/lib/redis 0700 redis redis
/etc/redis 0750 root redis"

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
make_build_args+=" MALLOC=libc"
else
makedepends+=" jemalloc-devel"
make_build_args+=" MALLOC=jemalloc"
# only passes --host to bundled jemalloc ./configure if DEB_HOST_GNU_TYPE is set
# https://github.com/redis/redis/blob/669b2a1316f5b35ecf964281b77c054ff28dc934/deps/Makefile#L143-L145
if [ "$CROSS_BUILD" ]; then
make_build_args+=" JEMALLOC_CONFIGURE_OPTS=--host=$XBPS_CROSS_TRIPLET"
fi

post_patch() {
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

# no perms to write to /proc/<pid>/oom_score_adj
rm -f tests/unit/oom-score-adj.tcl
vsed -i -e 's/^\(\s*set oom_adj_avail\).*/\1 0/' tests/unit/introspection.tcl
}

do_install() {
make INSTALL_BIN=${DESTDIR}/usr/bin PREFIX=/usr install
vlicense COPYING
make CC="$CC" LD="$CC" INSTALL_BIN=${DESTDIR}/usr/bin PREFIX=/usr install
vlicense LICENSE.txt

vinstall redis.conf 644 etc/redis
vsv redis
Expand Down