3 %bcond_without static_libs # static library
4 %bcond_without tcmalloc # tcmalloc usage
5 %bcond_without tests # unit tests
8 %undefine with_tcmalloc
10 Summary: LevelDB - key-value store library
11 Summary(pl.UTF-8): LevelDB - biblioteka bazy danych klucz-wartość
17 #Source0Download: https://github.com/google/leveldb/releases
18 Source0: https://github.com/google/leveldb/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 11609dcd141584a784d879d3879f36b7
20 Patch0: %{name}-soname.patch
21 URL: https://github.com/google/leveldb
22 BuildRequires: cmake >= 3.9
23 BuildRequires: libstdc++-devel >= 6:4.7
24 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
25 BuildRequires: snappy-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 LevelDB is a fast key-value storage library written at Google that
30 provides an ordered mapping from string keys to string values.
32 %description -l pl.UTF-8
33 LevelDB to napisana w Google szybka biblioteka do przechowywania par
34 klucz-wartość, udostępniająca uporządkowane odwzorowanie z kluczy
35 będących łańcuchami znaków do wartości tego samego typu.
38 Summary: Header files for LevelDB library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LevelDB
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
42 Requires: libstdc++-devel >= 6:4.7
43 %{?with_tcmalloc:Requires: libtcmalloc-devel}
44 Requires: snappy-devel
47 Header files for LevelDB library.
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki LevelDB.
53 Summary: Static LevelDB library
54 Summary(pl.UTF-8): Statyczna biblioteka LevelDB
55 Group: Development/Libraries
56 Requires: %{name}-devel = %{version}-%{release}
59 Static LevelDB library.
61 %description static -l pl.UTF-8
62 Statyczna biblioteka LevelDB.
69 %if %{with static_libs}
70 install -d build-static
73 -DBUILD_SHARED_LIBS:BOOL=OFF
90 rm -rf $RPM_BUILD_ROOT
92 %if %{with static_libs}
93 %{__make} -C build-static install \
94 DESTDIR=$RPM_BUILD_ROOT
97 %{__make} -C build install \
98 DESTDIR=$RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
103 %post -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
107 %defattr(644,root,root,755)
108 %doc AUTHORS LICENSE NEWS README.md TODO
109 %attr(755,root,root) %{_libdir}/libleveldb.so.*.*
110 %attr(755,root,root) %ghost %{_libdir}/libleveldb.so.1
113 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/libleveldb.so
116 %{_includedir}/leveldb
117 %{_libdir}/cmake/leveldb
119 %if %{with static_libs}
121 %defattr(644,root,root,755)
122 %{_libdir}/libleveldb.a