%global debug_package %{nil} %define _build_id_links none %if 0%{?rhel} && 0%{?rhel} < 10 %global gcc_toolset_enable source /opt/rh/gcc-toolset-15/enable %else %global gcc_toolset_enable source /usr/lib/gcc-toolset/15-env.source %endif Name: valkey Version: 9.0.4 Release: 1%{?dist} Summary: A persistent key-value database License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: https://valkey.io Source0: https://github.com/valkey-io/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source3: valkey.sysusers Source4: valkey.tmpfiles Patch1: valkey-9.0.4-use-system-jemalloc.patch BuildRequires: make BuildRequires: gcc-toolset-15-gcc BuildRequires: gcc-toolset-15-gcc-c++ BuildRequires: gcc-toolset-15-gcc-plugin-annobin BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel BuildRequires: jemalloc-devel %description Valkey is an advanced key-value store. %package devel Summary: Development headers for Valkey modules %description devel Header file required for building loadable Valkey modules. %package client Summary: Valkey CLI tools %description client Command line client and benchmarking tools for Valkey. %package sentinel Summary: Sentinel service for Valkey %description sentinel High availability Sentinel daemon for Valkey. %prep %setup -q -n %{name}-%{version} %patch -P1 -p1 %build %{gcc_toolset_enable} %make_build \ BUILD_WITH_SYSTEMD=yes \ BUILD_TLS=yes \ BUILD_RDMA=no %install install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_includedir}/%{name} install -d %{buildroot}%{_libdir}/%{name}/modules install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_localstatedir}/log/%{name} install -d %{buildroot}%{_localstatedir}/run/%{name} install -pm755 src/valkey-{server,cli,benchmark,check-aof,check-rdb,sentinel} %{buildroot}%{_bindir}/ install -pm644 src/valkeymodule.h %{buildroot}%{_includedir}/%{name} install -Dpm644 %{S:3} %{buildroot}%{_sysusersdir}/%{name}.conf install -Dpm644 %{S:4} %{buildroot}%{_tmpfilesdir}/%{name}.conf %files %dir %{_sysconfdir}/%{name} %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/modules %dir %{_sharedstatedir}/%{name} %ghost %dir %{_localstatedir}/run/%{name} %{_bindir}/valkey-server %{_bindir}/valkey-check-aof %{_bindir}/valkey-check-rdb %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf %files devel %{_includedir}/%{name}/valkeymodule.h %files client %{_bindir}/valkey-cli %{_bindir}/valkey-benchmark %files sentinel %{_bindir}/valkey-sentinel %changelog %autochangelog