]>
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 | |
6 | ||
c4a98ad2 JB |
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 | |
9 | Name: rocksdb | |
2592c03f | 10 | Version: 4.9 |
c4a98ad2 JB |
11 | Release: 1 |
12 | License: BSD | |
13 | Group: Libraries | |
d120039a | 14 | #Source0Download: https://github.com/facebook/rocksdb/releases |
c4a98ad2 | 15 | Source0: https://github.com/facebook/rocksdb/archive/%{name}-%{version}.tar.gz |
2592c03f | 16 | # Source0-md5: e23ab7b76faaa1fc4c96b86732b16448 |
c4a98ad2 | 17 | Patch0: %{name}-libdir.patch |
b427c498 | 18 | Patch1: make-programs.patch |
d120039a | 19 | Patch2: %{name}-numa.patch |
2592c03f | 20 | Patch3: %{name}-jemalloc.patch |
c4a98ad2 JB |
21 | URL: http://rocksdb.org/ |
22 | BuildRequires: bzip2-devel | |
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 |
c4a98ad2 | 30 | BuildRequires: lz4-devel |
d120039a | 31 | BuildRequires: numactl-devel |
c4a98ad2 JB |
32 | BuildRequires: snappy-devel |
33 | BuildRequires: zlib-devel | |
d120039a | 34 | BuildRequires: zstd-devel |
c4a98ad2 JB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
b136638d JB |
37 | # std::__once_call, std::__once_callable non-function symbols |
38 | %define skip_post_check_so librocksdb.so.* | |
39 | ||
c4a98ad2 JB |
40 | %description |
41 | RocksDB is a Persistent Key-Value Store for Flash and RAM Storage. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM. | |
45 | ||
46 | %package devel | |
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 | |
52 | ||
53 | %description devel | |
54 | Header files for RocksDB library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki RocksDB. | |
58 | ||
59 | %package static | |
60 | Summary: Static RocksDB library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka RocksDB | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static RocksDB library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka RocksDB. | |
70 | ||
71 | %prep | |
72 | %setup -q -n %{name}-%{name}-%{version} | |
73 | %patch0 -p1 | |
b427c498 | 74 | %patch1 -p1 |
d120039a | 75 | %patch2 -p1 |
2592c03f | 76 | %patch3 -p1 |
c4a98ad2 JB |
77 | |
78 | %build | |
1225ec57 JB |
79 | %ifarch i386 i486 |
80 | PLATFORM_LDFLAGS="-latomic" \ | |
81 | %endif | |
b427c498 | 82 | %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \ |
83ab867a | 83 | AM_DEFAULT_VERBOSITY=1 \ |
c4a98ad2 JB |
84 | CC="%{__cc}" \ |
85 | CXX="%{__cxx}" \ | |
86 | OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \ | |
d120039a JB |
87 | PORTABLE=1 \ |
88 | %{!?with_debug:DEBUG_LEVEL=0} | |
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 | |
d120039a | 100 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.4 |
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) | |
110 | %doc HISTORY.md LICENSE PATENTS README.md ROCKSDB_LITE.md | |
b136638d | 111 | %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.* |
2592c03f | 112 | %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.4.9 |
c4a98ad2 JB |
113 | |
114 | %files devel | |
115 | %defattr(644,root,root,755) | |
116 | %doc doc/* | |
b136638d | 117 | %attr(755,root,root) %{_libdir}/librocksdb.so |
c4a98ad2 JB |
118 | %{_includedir}/rocksdb |
119 | ||
b427c498 | 120 | %if %{with static_libs} |
c4a98ad2 JB |
121 | %files static |
122 | %defattr(644,root,root,755) | |
123 | %{_libdir}/librocksdb.a | |
b427c498 | 124 | %endif |