]>
Commit | Line | Data |
---|---|---|
b427c498 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | ||
c4a98ad2 JB |
6 | Summary: RocksDB: A Persistent Key-Value Store for Flash and RAM Storage |
7 | Summary(pl.UTF-8): RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM | |
8 | Name: rocksdb | |
b136638d | 9 | Version: 3.13.1 |
c4a98ad2 JB |
10 | Release: 1 |
11 | License: BSD | |
12 | Group: Libraries | |
13 | Source0: https://github.com/facebook/rocksdb/archive/%{name}-%{version}.tar.gz | |
b136638d | 14 | # Source0-md5: 2e0a6482ce1756bfdff73a0e09006a92 |
c4a98ad2 | 15 | Patch0: %{name}-libdir.patch |
b427c498 | 16 | Patch1: make-programs.patch |
c4a98ad2 JB |
17 | URL: http://rocksdb.org/ |
18 | BuildRequires: bzip2-devel | |
19 | BuildRequires: gflags-devel | |
1225ec57 JB |
20 | %ifarch i386 i486 |
21 | BuildRequires: libatomic-devel | |
22 | %endif | |
c4a98ad2 JB |
23 | BuildRequires: libstdc++-devel >= 6:4.7 |
24 | BuildRequires: libtcmalloc-devel | |
25 | BuildRequires: lz4-devel | |
26 | BuildRequires: snappy-devel | |
27 | BuildRequires: zlib-devel | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
b136638d JB |
30 | # std::__once_call, std::__once_callable non-function symbols |
31 | %define skip_post_check_so librocksdb.so.* | |
32 | ||
c4a98ad2 JB |
33 | %description |
34 | RocksDB is a Persistent Key-Value Store for Flash and RAM Storage. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | RocksDB to trwała baza danych klucz-wartość dla pamięci Flash i RAM. | |
38 | ||
39 | %package devel | |
40 | Summary: Header files for RocksDB library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki RocksDB | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: libstdc++-devel >= 6:4.7 | |
45 | ||
46 | %description devel | |
47 | Header files for RocksDB library. | |
48 | ||
49 | %description devel -l pl.UTF-8 | |
50 | Pliki nagłówkowe biblioteki RocksDB. | |
51 | ||
52 | %package static | |
53 | Summary: Static RocksDB library | |
54 | Summary(pl.UTF-8): Statyczna biblioteka RocksDB | |
55 | Group: Development/Libraries | |
56 | Requires: %{name}-devel = %{version}-%{release} | |
57 | ||
58 | %description static | |
59 | Static RocksDB library. | |
60 | ||
61 | %description static -l pl.UTF-8 | |
62 | Statyczna biblioteka RocksDB. | |
63 | ||
64 | %prep | |
65 | %setup -q -n %{name}-%{name}-%{version} | |
66 | %patch0 -p1 | |
b427c498 | 67 | %patch1 -p1 |
c4a98ad2 JB |
68 | |
69 | %build | |
1225ec57 JB |
70 | %ifarch i386 i486 |
71 | PLATFORM_LDFLAGS="-latomic" \ | |
72 | %endif | |
b427c498 | 73 | %{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \ |
83ab867a | 74 | AM_DEFAULT_VERBOSITY=1 \ |
c4a98ad2 JB |
75 | CC="%{__cc}" \ |
76 | CXX="%{__cxx}" \ | |
77 | OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \ | |
78 | WARNING_FLAGS="%{rpmcppflags} -Wall" | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
c4a98ad2 JB |
82 | %{__make} install \ |
83 | INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \ | |
b136638d JB |
84 | INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} |
85 | ||
86 | # reduntant symlink | |
87 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.3 | |
c4a98ad2 JB |
88 | |
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post -p /sbin/ldconfig | |
93 | %postun -p /sbin/ldconfig | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc HISTORY.md LICENSE PATENTS README.md ROCKSDB_LITE.md | |
b136638d JB |
98 | %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.* |
99 | %attr(755,root,root) %ghost %{_libdir}/librocksdb.so.3.13 | |
c4a98ad2 JB |
100 | |
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
103 | %doc doc/* | |
b136638d | 104 | %attr(755,root,root) %{_libdir}/librocksdb.so |
c4a98ad2 JB |
105 | %{_includedir}/rocksdb |
106 | ||
b427c498 | 107 | %if %{with static_libs} |
c4a98ad2 JB |
108 | %files static |
109 | %defattr(644,root,root,755) | |
110 | %{_libdir}/librocksdb.a | |
b427c498 | 111 | %endif |