New package: valkey-8.0.1

closes #50978
This commit is contained in:
classabbyamp 2024-08-26 14:44:27 -04:00 committed by classabbyamp
parent 141ffcf25a
commit 13de99045d
5 changed files with 84 additions and 0 deletions

1
srcpkgs/valkey-redis Symbolic link
View file

@ -0,0 +1 @@
valkey

View file

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
install -d -m0750 -o _valkey -g _valkey /run/valkey
exec chpst -u _valkey:_valkey valkey-sentinel /etc/valkey/sentinel.conf

View file

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
install -d -m0750 -o _valkey -g _valkey /run/valkey
exec chpst -u _valkey:_valkey valkey-server /etc/valkey/valkey.conf

View file

@ -0,0 +1,15 @@
diff --git a/src/Makefile b/src/Makefile
index 3bc9f11c0..a4b23d986 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -229,8 +229,8 @@ endif
ifeq ($(MALLOC),jemalloc)
DEPENDENCY_TARGETS+= jemalloc
- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
- FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc
+ FINAL_LIBS := -ljemalloc $(FINAL_LIBS)
endif
ifeq ($(BUILD_TLS),yes)

60
srcpkgs/valkey/template Normal file
View file

@ -0,0 +1,60 @@
# Template file for 'valkey'
pkgname=valkey
version=8.0.1
revision=1
build_style=gnu-makefile
make_build_args="V=1 BUILD_TLS=yes"
make_check_target="test"
hostmakedepends="pkg-config which"
makedepends="openssl-devel"
checkdepends="tcl procps-ng"
short_desc="Flexible distributed key-value datastore"
maintainer="classabbyamp <void@placeviolette.net>"
license="BSD-3-Clause"
homepage="https://valkey.io"
changelog="https://github.com/valkey-io/valkey/releases"
distfiles="https://github.com/valkey-io/valkey/archive/refs/tags/${version}.tar.gz"
checksum=1e1d6dfbed2f932a87afbc7402be050a73974a9b19a9116897e537a6638e5e1d
system_accounts="_valkey"
_valkey_homedir="/var/lib/valkey"
conf_files="/etc/valkey/valkey.conf
/etc/valkey/sentinel.conf"
make_dirs="/var/lib/valkey 0700 _valkey _valkey
/etc/valkey 0750 root _valkey"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
make_build_args+=" MALLOC=libc"
else
makedepends+=" jemalloc-devel"
make_build_args+=" MALLOC=jemalloc"
fi
post_patch() {
vsed -i \
-e "s|^dir .*|dir ${_valkey_homedir}|" \
-e "s|^pidfile .*|pidfile /run/valkey/valkey.pid|" valkey.conf
vsed -i \
-e "s|^dir .*|dir ${_valkey_homedir}|" \
-e "s|^pidfile .*|pidfile /run/valkey/sentinel.pid|" sentinel.conf
}
do_install() {
make INSTALL_BIN=${DESTDIR}/usr/bin PREFIX=/usr install
vlicense COPYING
vinstall valkey.conf 644 etc/valkey
vinstall sentinel.conf 644 etc/valkey
vsv valkey
vsv valkey-sentinel
}
valkey-redis_package() {
short_desc+=" - redis compatibility links"
depends="${sourcepkg}>=${version}_${revision}"
conflicts="redis>=0"
replaces="redis>=0"
pkg_install() {
vmove usr/bin/redis-*
}
}