61 lines
1.6 KiB
Bash
61 lines
1.6 KiB
Bash
# 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-*
|
|
}
|
|
}
|