From b725d00e6e9216e6265cf5d313fd5170d94044b8 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:52:19 -0700 Subject: [PATCH] Add kvrocks build recipe (#1545) (#1546) (cherry picked from commit 76fb757094c349032c5caf5925b77ae87d5997f1) Co-authored-by: Philipp Trulson --- anda/devs/kvrocks/anda.hcl | 6 ++++ anda/devs/kvrocks/kvrocks.spec | 50 ++++++++++++++++++++++++++++++++++ anda/devs/kvrocks/update.rhai | 1 + 3 files changed, 57 insertions(+) create mode 100644 anda/devs/kvrocks/anda.hcl create mode 100644 anda/devs/kvrocks/kvrocks.spec create mode 100644 anda/devs/kvrocks/update.rhai diff --git a/anda/devs/kvrocks/anda.hcl b/anda/devs/kvrocks/anda.hcl new file mode 100644 index 0000000000..0508a7c98d --- /dev/null +++ b/anda/devs/kvrocks/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64", "aarch64"] + rpm { + spec = "kvrocks.spec" + } +} diff --git a/anda/devs/kvrocks/kvrocks.spec b/anda/devs/kvrocks/kvrocks.spec new file mode 100644 index 0000000000..28013e819d --- /dev/null +++ b/anda/devs/kvrocks/kvrocks.spec @@ -0,0 +1,50 @@ +Name: kvrocks +Version: 2.9.0 +Release: 1%?dist +Summary: Distributed key value NoSQL database that uses RocksDB +License: Apache-2.0 +URL: https://kvrocks.apache.org/ +Source0: https://github.com/apache/kvrocks/archive/refs/tags/v%version.tar.gz +Requires: openssl +BuildRequires: autoconf +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: openssl-devel +BuildRequires: python3 +BuildRequires: systemd-rpm-macros + +%description +Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage +engine and is compatible with Redis protocol. + +%prep +%autosetup + +%build +unset LDFLAGS +./x.py build -DPORTABLE=1 -DENABLE_STATIC_LIBSTDCXX=OFF -DENABLE_OPENSSL=ON -DCMAKE_BUILD_TYPE=Release --ghproxy -j $(nproc) + +%install +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir} + +install -pm755 build/%{name} %{buildroot}%{_bindir}/%{name} +install -pm755 build/kvrocks2redis %{buildroot}%{_bindir}/kvrocks2redis + +install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +install -pDm644 utils/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service + +%files +%{_bindir}/%{name} +%{_bindir}/kvrocks2redis +%attr(0750, root, root) %dir %{_sysconfdir}/%{name} +%attr(0640, root, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%{_unitdir}/%{name}.service +%license LICENSE +%license NOTICE +%license licenses/LICENSE-* + + +%changelog +%autochangelog diff --git a/anda/devs/kvrocks/update.rhai b/anda/devs/kvrocks/update.rhai new file mode 100644 index 0000000000..0eb2758a9f --- /dev/null +++ b/anda/devs/kvrocks/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("apache/kvrocks"));