]> git.pld-linux.org Git - SPECS.git/blob - lmdb.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / lmdb.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Memory-mapped key-value database
6 Summary(pl.UTF-8):      Baza danych klucz-wartość odwzorowywana w pamięci
7 Name:           lmdb
8 Version:        0.9.24
9 Release:        1
10 License:        OpenLDAP
11 Group:          Applications/Databases
12 #Source0Download: https://github.com/LMDB/lmdb/releases
13 Source0:        https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz
14 # Source0-md5:  c3e3474daf4a59685d154cc7fc5c99ad
15 Source1:        %{name}.pc.in
16 Patch0:         %{name}-make.patch
17 URL:            http://symas.com/mdb/
18 BuildRequires:  doxygen
19 Requires:       %{name}-libs = %{version}-%{release}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 LMDB is an ultra-fast, ultra-compact key-value embedded data store
24 developed by for the OpenLDAP Project. By using memory-mapped files,
25 it provides the read performance of a pure in-memory database while
26 still offering the persistence of standard disk-based databases, and
27 is only limited to the size of the virtual address space.
28
29 %description -l pl.UTF-8
30 LMDB to bardzo szybka i zwarta, wbudowana baza danych klucz-wartość
31 rozwijana dla projektu OpenLDAP. Dzięki użyciu plików odwzorowywanych
32 w pamięci zapewnia wydajność odczytu analogiczną do bazydanych
33 trzymanej w pamięci, oferując jednocześnie trwałość charakterystyczną
34 dla baz opartych na dysku oraz ograniczenie wyłącznie rozmiarem
35 wirtualnej przestrzeni adresowej.
36
37 %package libs
38 Summary:        LMDB shared library
39 Summary(pl.UTF-8):      Biblioteka współdzielona LMDB
40 Group:          Libraries
41
42 %description libs
43 This package contains the shared library necessary for running
44 applications that use LMDB.
45
46 %description libs -l pl.UTF-8
47 Ten pakiet zawiera bibliotekę współdzieloną konieczną do uruchamiania
48 aplikacji wykorzystujących LMDB.
49
50 %package devel
51 Summary:        Header files for LMDB library
52 Summary(pl.UTF-8):      Plik nagłówkowy LMDB
53 Group:          Development/Libraries
54 Requires:       %{name}-libs = %{version}-%{release}
55
56 %description devel
57 This package contains the header file for developing applications that
58 use LMDB.
59
60 %description devel -l pl.UTF-8
61 Ten pakiet zawiera plik nagłówkowy do tworzenia aplikacji
62 wykorzystujących LMDB.
63
64 %package static
65 Summary:        Static LMDB library
66 Summary(pl.UTF-8):      Statyczna biblioteka LMDB
67 Group:          Development/Libraries
68 Requires:       %{name}-devel = %{version}-%{release}
69
70 %description static
71 Static LMDB library.
72
73 %description static -l pl.UTF-8
74 Statyczna biblioteka LMDB.
75
76 %package apidocs
77 Summary:        LMDB API documentation
78 Summary(pl.UTF-8):      Dokumentacja API biblioteki LMDB
79 Group:          Documentation
80 BuildArch:      noarch
81
82 %description apidocs
83 LMDB API documentation.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API biblioteki LMDB.
87
88 %prep
89 %setup -q -n %{name}-LMDB_%{version}
90 %patch0 -p1
91
92 %{__mv} libraries/liblmdb/* .
93
94 %build
95 %{__make} \
96         CC="%{__cc}" \
97         XCFLAGS="%{rpmcflags} %{rpmcppflags}"
98
99 %if %{with tests}
100 rm -rf testdb
101 LD_LIBRARY_PATH=$PWD %{__make} test
102 %endif
103
104 # Build doxygen documentation
105 doxygen
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 # make install expects existing directory tree
111 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1,%{_pkgconfigdir}}
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT \
115         prefix=%{_prefix} \
116         libdir=%{_libdir}
117
118 # rename to have typical 0.0.0 file
119 ln -sf liblmdb.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/liblmdb.so
120 %{__mv} $RPM_BUILD_ROOT%{_libdir}/liblmdb.so.{0,0.0.0}
121 /sbin/ldconfig -n  $RPM_BUILD_ROOT%{_libdir}
122
123 %{__sed} -e 's:@PREFIX@:%{_prefix}:g' \
124         -e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \
125         -e 's:@LIBDIR@:%{_libdir}:g' \
126         -e 's:@INCLUDEDIR@:%{_includedir}:g' \
127         -e 's:@PACKAGE_VERSION@:%{version}:g' \
128         %{SOURCE1} >$RPM_BUILD_ROOT%{_pkgconfigdir}/lmdb.pc
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   libs -p /sbin/ldconfig
134 %postun libs -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/mdb_copy
139 %attr(755,root,root) %{_bindir}/mdb_dump
140 %attr(755,root,root) %{_bindir}/mdb_load
141 %attr(755,root,root) %{_bindir}/mdb_stat
142 %{_mandir}/man1/mdb_copy.1*
143 %{_mandir}/man1/mdb_dump.1*
144 %{_mandir}/man1/mdb_load.1*
145 %{_mandir}/man1/mdb_stat.1*
146
147 %files libs
148 %defattr(644,root,root,755)
149 %doc CHANGES COPYRIGHT LICENSE
150 %attr(755,root,root) %{_libdir}/liblmdb.so.*.*.*
151 %ghost %{_libdir}/liblmdb.so.0
152
153 %files devel
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/liblmdb.so
156 %{_includedir}/lmdb.h
157 %{_pkgconfigdir}/lmdb.pc
158
159 %files static
160 %defattr(644,root,root,755)
161 %{_libdir}/liblmdb.a
162
163 %files apidocs
164 %defattr(644,root,root,755)
165 %doc html/*
This page took 0.27838 seconds and 3 git commands to generate.