4 %bcond_with tests # build with tests
5 %bcond_without static_libs # don't build static libraries
7 Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
8 Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
14 #Source0Download: https://github.com/facebook/rocksdb/releases
15 Source0: https://github.com/facebook/rocksdb/archive/%{name}-%{version}.tar.gz
16 # Source0-md5: f94191cf37221c4541dfb4d7f544651e
17 Patch0: %{name}-libdir.patch
18 Patch1: make-programs.patch
19 Patch2: %{name}-jemalloc.patch
20 Patch3: %{name}-detect-flags.patch
21 URL: http://rocksdb.org/
22 BuildRequires: bzip2-devel
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.7
31 BuildRequires: numactl-devel
32 BuildRequires: snappy-devel
33 BuildRequires: zlib-devel
34 BuildRequires: zstd-devel >= 0.8.0
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 # std::__once_call, std::__once_callable non-function symbols
38 %define skip_post_check_so librocksdb.so.*
41 RocksDB is a Persistent Key-Value Store for Flash and RAM Storage.
43 %description -l pl.UTF-8
44 RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM.
47 Summary: Header files for RocksDB library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
51 Requires: libstdc++-devel >= 6:4.7
54 Header files for RocksDB library.
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki RocksDB.
60 Summary: Static RocksDB library
61 Summary(pl.UTF-8): Statyczna biblioteka RocksDB
62 Group: Development/Libraries
63 Requires: %{name}-devel = %{version}-%{release}
66 Static RocksDB library.
68 %description static -l pl.UTF-8
69 Statyczna biblioteka RocksDB.
72 %setup -q -n %{name}-%{name}-%{version}
80 PLATFORM_LDFLAGS="-latomic" \
82 %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
83 AM_DEFAULT_VERBOSITY=1 \
86 EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
87 OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
89 %{!?with_debug:DEBUG_LEVEL=0}
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.4
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 PATENTS README.md ROCKSDB_LITE.md USERS.md
112 %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
113 %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.4.13
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