4 %bcond_with tests # build with tests
5 %bcond_with benchmark # enable Google Benchmark
6 %bcond_without static_libs # don't build static libraries
7 %bcond_without tbb # Threading Building Blocks support
9 Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
10 Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
16 #Source0Download: https://github.com/facebook/rocksdb/releases
17 Source0: https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: be498cd7125f2a38059609469adf147f
19 Patch0: %{name}-detect-flags.patch
20 Patch1: %{name}-pc.patch
21 URL: https://rocksdb.org/
22 BuildRequires: bzip2-devel >= 1.0.8
23 BuildRequires: gflags-devel
24 %{?with_benchmark:BuildRequires: google-benchmark-devel}
25 # libtcmalloc also supported, but jemalloc is preferred
26 BuildRequires: jemalloc-devel
28 BuildRequires: libatomic-devel
30 BuildRequires: libstdc++-devel >= 6:4.7
31 BuildRequires: liburing-devel
32 BuildRequires: lz4-devel >= 1:1.9.2
33 BuildRequires: numactl-devel
34 BuildRequires: rpmbuild(macros) >= 1.734
35 BuildRequires: snappy-devel >= 1.1.8
36 %{?with_tbb:BuildRequires: tbb-devel}
37 BuildRequires: zlib-devel >= 1.2.11
38 BuildRequires: zstd-devel >= 1.4.4
39 Requires: bzip2 >= 1.0.8
40 Requires: lz4 >= 1:1.9.2
41 Requires: snappy >= 1.1.8
42 Requires: zlib >= 1.2.11
43 Requires: zstd >= 1.4.4
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 RocksDB is a Persistent Key-Value Store for Flash and RAM Storage.
49 %description -l pl.UTF-8
50 RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM.
53 Summary: Header files for RocksDB library
54 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
57 Requires: libstdc++-devel >= 6:4.7
60 Header files for RocksDB library.
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki RocksDB.
66 Summary: Static RocksDB library
67 Summary(pl.UTF-8): Statyczna biblioteka RocksDB
68 Group: Development/Libraries
69 Requires: %{name}-devel = %{version}-%{release}
72 Static RocksDB library.
74 %description static -l pl.UTF-8
75 Statyczna biblioteka RocksDB.
83 %if %{without benchmark}
84 export ROCKSDB_DISABLE_BENCHMARK=1
87 export ROCKSDB_DISABLE_TBB=1
91 PLATFORM_LDFLAGS="-latomic" \
93 %{__make} shared_lib %{?with_static_libs:static_lib} tools tools_lib %{?with_tests:check} \
94 AM_DEFAULT_VERBOSITY=1 \
97 %{!?with_debug:DEBUG_LEVEL=0} \
98 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
99 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
102 WARNING_FLAGS="%{rpmcppflags} -Wall"
105 rm -rf $RPM_BUILD_ROOT
107 %if %{without benchmark}
108 export ROCKSDB_DISABLE_BENCHMARK=1
111 export ROCKSDB_DISABLE_TBB=1
115 %{!?with_debug:DEBUG_LEVEL=0} \
117 DESTDIR=$RPM_BUILD_ROOT \
122 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
125 rm -rf $RPM_BUILD_ROOT
127 %post -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
131 %defattr(644,root,root,755)
132 %doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
133 %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
134 %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.29
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_libdir}/librocksdb.so
139 %{_includedir}/rocksdb
140 %{_pkgconfigdir}/rocksdb.pc
142 %if %{with static_libs}
144 %defattr(644,root,root,755)
145 %{_libdir}/librocksdb.a