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