4 %bcond_with tests # build with tests
5 %bcond_without static_libs # don't build static libraries
6 %bcond_without tbb # Threading Building Blocks support
8 Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
9 Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
15 #Source0Download: https://github.com/facebook/rocksdb/releases
16 Source0: https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: 8648dbe2589748b9dff3c1fe725f210b
18 Patch0: %{name}-libdir.patch
19 Patch1: make-programs.patch
20 Patch2: %{name}-detect-flags.patch
21 Patch3: %{name}-link.patch
22 URL: https://rocksdb.org/
23 BuildRequires: bzip2-devel >= 1.0.8
24 BuildRequires: gflags-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: lz4-devel >= 1:1.9.2
32 BuildRequires: numactl-devel
33 BuildRequires: rpmbuild(macros) >= 1.734
34 BuildRequires: snappy-devel >= 1.1.8
35 %{?with_tbb:BuildRequires: tbb-devel}
36 BuildRequires: zlib-devel >= 1.2.11
37 BuildRequires: zstd-devel >= 1.4.4
38 Requires: bzip2 >= 1.0.8
39 Requires: lz4 >= 1:1.9.2
40 Requires: snappy >= 1.1.8
41 Requires: zlib >= 1.2.11
42 Requires: zstd >= 1.4.4
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 RocksDB is a Persistent Key-Value Store for Flash and RAM Storage.
48 %description -l pl.UTF-8
49 RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM.
52 Summary: Header files for RocksDB library
53 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
56 Requires: libstdc++-devel >= 6:4.7
59 Header files for RocksDB library.
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki RocksDB.
65 Summary: Static RocksDB library
66 Summary(pl.UTF-8): Statyczna biblioteka RocksDB
67 Group: Development/Libraries
68 Requires: %{name}-devel = %{version}-%{release}
71 Static RocksDB library.
73 %description static -l pl.UTF-8
74 Statyczna biblioteka RocksDB.
85 PLATFORM_LDFLAGS="-latomic" \
87 %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
88 AM_DEFAULT_VERBOSITY=1 \
91 %{!?with_debug:DEBUG_LEVEL=0} \
92 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
93 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
95 %{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \
97 WARNING_FLAGS="%{rpmcppflags} -Wall"
100 rm -rf $RPM_BUILD_ROOT
103 %{!?with_debug:DEBUG_LEVEL=0} \
104 INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \
105 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir}
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
111 rm -rf $RPM_BUILD_ROOT
113 %post -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
117 %defattr(644,root,root,755)
118 %doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
119 %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
120 %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.8
123 %defattr(644,root,root,755)
124 %attr(755,root,root) %{_libdir}/librocksdb.so
125 %{_includedir}/rocksdb
127 %if %{with static_libs}
129 %defattr(644,root,root,755)
130 %{_libdir}/librocksdb.a