Skip to content

Commit

Permalink
Add kvrocks build recipe (#1545) (#1546)
Browse files Browse the repository at this point in the history
(cherry picked from commit 76fb757)

Co-authored-by: Philipp Trulson <[email protected]>
  • Loading branch information
raboneko and der-eismann authored Jul 18, 2024
1 parent 8e3ca34 commit b725d00
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions anda/devs/kvrocks/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project pkg {
arches = ["x86_64", "aarch64"]
rpm {
spec = "kvrocks.spec"
}
}
50 changes: 50 additions & 0 deletions anda/devs/kvrocks/kvrocks.spec
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions anda/devs/kvrocks/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rpm.version(gh("apache/kvrocks"));

0 comments on commit b725d00

Please sign in to comment.