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: a8f2f594182e97a08629bcc66dfd3fa0
18 Patch0: %{name}-libdir.patch
19 Patch1: make-programs.patch
20 Patch2: %{name}-detect-flags.patch
21 URL: http://rocksdb.org/
22 BuildRequires: bzip2-devel >= 1.0.6
23 BuildRequires: gflags-devel
24 # libtcmalloc also supported, but jemalloc is preferred
25 BuildRequires: jemalloc-devel
27 BuildRequires: libatomic-devel
29 BuildRequires: libstdc++-devel >= 6:4.7
30 BuildRequires: lz4-devel >= 1:1.8.3
31 BuildRequires: numactl-devel
32 BuildRequires: rpmbuild(macros) >= 1.734
33 BuildRequires: snappy-devel >= 1.1.7
34 %{?with_tbb:BuildRequires: tbb-devel}
35 BuildRequires: zlib-devel >= 1.2.11
36 BuildRequires: zstd-devel >= 1.3.7
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 RocksDB is a Persistent Key-Value Store for Flash and RAM Storage.
42 %description -l pl.UTF-8
43 RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM.
46 Summary: Header files for RocksDB library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: libstdc++-devel >= 6:4.7
53 Header files for RocksDB library.
55 %description devel -l pl.UTF-8
56 Pliki nagłówkowe biblioteki RocksDB.
59 Summary: Static RocksDB library
60 Summary(pl.UTF-8): Statyczna biblioteka RocksDB
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}-%{release}
65 Static RocksDB library.
67 %description static -l pl.UTF-8
68 Statyczna biblioteka RocksDB.
78 PLATFORM_LDFLAGS="-latomic" \
80 %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
81 AM_DEFAULT_VERBOSITY=1 \
84 %{!?with_debug:DEBUG_LEVEL=0} \
85 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
86 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
88 %{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \
90 WARNING_FLAGS="%{rpmcppflags} -Wall"
93 rm -rf $RPM_BUILD_ROOT
96 %{!?with_debug:DEBUG_LEVEL=0} \
97 INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \
98 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir}
101 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
104 rm -rf $RPM_BUILD_ROOT
106 %post -p /sbin/ldconfig
107 %postun -p /sbin/ldconfig
110 %defattr(644,root,root,755)
111 %doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
112 %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
113 %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.0
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_libdir}/librocksdb.so
118 %{_includedir}/rocksdb
120 %if %{with static_libs}
122 %defattr(644,root,root,755)
123 %{_libdir}/librocksdb.a