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