]> git.pld-linux.org Git - packages/leveldb.git/blob - leveldb.spec
- updated to 1.21
[packages/leveldb.git] / leveldb.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_without  tcmalloc        # tcmalloc usage
5 %bcond_without  tests           # unit tests
6
7 %ifarch x32
8 %undefine       with_tcmalloc
9 %endif
10 Summary:        LevelDB - key-value store library
11 Summary(pl.UTF-8):      LevelDB - biblioteka bazy danych klucz-wartość
12 Name:           leveldb
13 Version:        1.21
14 Release:        1
15 License:        BSD
16 Group:          Libraries
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)
27
28 %description
29 LevelDB is a fast key-value storage library written at Google that
30 provides an ordered mapping from string keys to string values.
31
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.
36
37 %package devel
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
45
46 %description devel
47 Header files for LevelDB library.
48
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki LevelDB.
51
52 %package static
53 Summary:        Static LevelDB library
54 Summary(pl.UTF-8):      Statyczna biblioteka LevelDB
55 Group:          Development/Libraries
56 Requires:       %{name}-devel = %{version}-%{release}
57
58 %description static
59 Static LevelDB library.
60
61 %description static -l pl.UTF-8
62 Statyczna biblioteka LevelDB.
63
64 %prep
65 %setup -q
66 %patch0 -p1
67
68 %build
69 %if %{with static_libs}
70 install -d build-static
71 cd build-static
72 %cmake .. \
73         -DBUILD_SHARED_LIBS:BOOL=OFF
74
75 %{__make}
76 cd ..
77 %endif
78
79 install -d build
80 cd build
81 %cmake ..
82
83 %{__make}
84
85 %if %{with tests}
86 ctest
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with static_libs}
93 %{__make} -C build-static install \
94         DESTDIR=$RPM_BUILD_ROOT
95 %endif
96
97 %{__make} -C build install \
98         DESTDIR=$RPM_BUILD_ROOT
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post   -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
105
106 %files
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
111
112 %files devel
113 %defattr(644,root,root,755)
114 %doc doc/*
115 %attr(755,root,root) %{_libdir}/libleveldb.so
116 %{_includedir}/leveldb
117 %{_libdir}/cmake/leveldb
118
119 %if %{with static_libs}
120 %files static
121 %defattr(644,root,root,755)
122 %{_libdir}/libleveldb.a
123 %endif
This page took 0.143789 seconds and 3 git commands to generate.