]>
Commit | Line | Data |
---|---|---|
d120039a | 1 | # TODO: hdfs/java |
b427c498 ER |
2 | # |
3 | # Conditional build: | |
4 | %bcond_with tests # build with tests | |
5 | %bcond_without static_libs # don't build static libraries | |
dd1b7ced | 6 | %bcond_without tbb # Threading Building Blocks support |
b427c498 | 7 | |
c4a98ad2 JB |
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 | |
10 | Name: rocksdb | |
4eda5fd3 | 11 | Version: 6.8.1 |
36bc8694 | 12 | Release: 2 |
c4a98ad2 JB |
13 | License: BSD |
14 | Group: Libraries | |
d120039a | 15 | #Source0Download: https://github.com/facebook/rocksdb/releases |
dd1b7ced | 16 | Source0: https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz |
4eda5fd3 | 17 | # Source0-md5: 8648dbe2589748b9dff3c1fe725f210b |
c4a98ad2 | 18 | Patch0: %{name}-libdir.patch |
b427c498 | 19 | Patch1: make-programs.patch |
dd1b7ced | 20 | Patch2: %{name}-detect-flags.patch |
4eda5fd3 JB |
21 | Patch3: %{name}-link.patch |
22 | URL: https://rocksdb.org/ | |
23 | BuildRequires: bzip2-devel >= 1.0.8 | |
c4a98ad2 | 24 | BuildRequires: gflags-devel |
d120039a JB |
25 | # libtcmalloc also supported, but jemalloc is preferred |
26 | BuildRequires: jemalloc-devel | |
1225ec57 JB |
27 | %ifarch i386 i486 |
28 | BuildRequires: libatomic-devel | |
29 | %endif | |
c4a98ad2 | 30 | BuildRequires: libstdc++-devel >= 6:4.7 |
4eda5fd3 | 31 | BuildRequires: lz4-devel >= 1:1.9.2 |
d120039a | 32 | BuildRequires: numactl-devel |
dfb5c736 | 33 | BuildRequires: rpmbuild(macros) >= 1.734 |
4eda5fd3 | 34 | BuildRequires: snappy-devel >= 1.1.8 |
dd1b7ced JB |
35 | %{?with_tbb:BuildRequires: tbb-devel} |
36 | BuildRequires: zlib-devel >= 1.2.11 | |
4eda5fd3 JB |
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 | |
c4a98ad2 JB |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
46 | RocksDB is a Persistent Key-Value Store for Flash and RAM Storage. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM. | |
50 | ||
51 | %package devel | |
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 | |
57 | ||
58 | %description devel | |
59 | Header files for RocksDB library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki nagłówkowe biblioteki RocksDB. | |
63 | ||
64 | %package static | |
65 | Summary: Static RocksDB library | |
66 | Summary(pl.UTF-8): Statyczna biblioteka RocksDB | |
67 | Group: Development/Libraries | |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static RocksDB library. | |
72 | ||
73 | %description static -l pl.UTF-8 | |
74 | Statyczna biblioteka RocksDB. | |
75 | ||
76 | %prep | |
dd1b7ced | 77 | %setup -q |
c4a98ad2 | 78 | %patch0 -p1 |
b427c498 | 79 | %patch1 -p1 |
d120039a | 80 | %patch2 -p1 |
4eda5fd3 | 81 | %patch3 -p1 |
c4a98ad2 JB |
82 | |
83 | %build | |
1225ec57 JB |
84 | %ifarch i386 i486 |
85 | PLATFORM_LDFLAGS="-latomic" \ | |
86 | %endif | |
b427c498 | 87 | %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \ |
83ab867a | 88 | AM_DEFAULT_VERBOSITY=1 \ |
c4a98ad2 JB |
89 | CC="%{__cc}" \ |
90 | CXX="%{__cxx}" \ | |
e76d675c | 91 | %{!?with_debug:DEBUG_LEVEL=0} \ |
4907cb5a | 92 | EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \ |
c4a98ad2 | 93 | OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \ |
d120039a | 94 | PORTABLE=1 \ |
dd1b7ced | 95 | %{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \ |
e76d675c | 96 | USE_RTTI=1 \ |
c4a98ad2 JB |
97 | WARNING_FLAGS="%{rpmcppflags} -Wall" |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
d120039a | 101 | |
c4a98ad2 | 102 | %{__make} install \ |
d120039a | 103 | %{!?with_debug:DEBUG_LEVEL=0} \ |
c4a98ad2 | 104 | INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \ |
b136638d JB |
105 | INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} |
106 | ||
107 | # reduntant symlink | |
dd1b7ced | 108 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6 |
c4a98ad2 JB |
109 | |
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %post -p /sbin/ldconfig | |
114 | %postun -p /sbin/ldconfig | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
dd1b7ced | 118 | %doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md |
b136638d | 119 | %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.* |
4eda5fd3 | 120 | %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.8 |
c4a98ad2 JB |
121 | |
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
b136638d | 124 | %attr(755,root,root) %{_libdir}/librocksdb.so |
c4a98ad2 JB |
125 | %{_includedir}/rocksdb |
126 | ||
b427c498 | 127 | %if %{with static_libs} |
c4a98ad2 JB |
128 | %files static |
129 | %defattr(644,root,root,755) | |
130 | %{_libdir}/librocksdb.a | |
b427c498 | 131 | %endif |