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