]> git.pld-linux.org Git - packages/ldb.git/blob - ldb.spec
a037a641869727f3ceb923d4faa9897361e62772
[packages/ldb.git] / ldb.spec
1 #
2 # Conditional build:
3 %bcond_without  lmdb    # LMDB module (64-bit only)
4 %bcond_without  python2 # CPython 2.x interface
5 #
6 %ifnarch %{x8664} aarch64 alpha mips64 ppc64 s390x sparc64
7 # lmdb support requires 64-bit size_t
8 %undefine       with_lmdb
9 %endif
10 %define         talloc_version  2:2.1.16
11 %define         tdb_version     2:1.3.18
12 %define         tevent_version  0.9.39
13 Summary:        LDAP-like embedded database
14 Summary(pl.UTF-8):      Wbudowana baza danych podobna do LDAP
15 Name:           ldb
16 Version:        1.5.6
17 Release:        1
18 License:        LGPL v3+
19 Group:          Libraries
20 Source0:        https://www.samba.org/ftp/ldb/%{name}-%{version}.tar.gz
21 # Source0-md5:  fc58ef432c1fcb03fc3bb6cccce08977
22 URL:            https://ldb.samba.org/
23 BuildRequires:  cmocka-devel >= 1.1.3
24 BuildRequires:  docbook-style-xsl
25 BuildRequires:  libxslt-progs
26 %{?with_lmdb:BuildRequires:     lmdb-devel >= 0.9.16}
27 BuildRequires:  openldap-devel
28 BuildRequires:  popt-devel >= 1.6
29 %if %{with python2}
30 BuildRequires:  python-devel >= 1:2.4.2
31 BuildRequires:  python-talloc-devel >= %{talloc_version}
32 BuildRequires:  python-tdb >= %{tdb_version}
33 BuildRequires:  python-tevent >= %{tevent_version}
34 %endif
35 BuildRequires:  python3-devel >= 1:3.2
36 BuildRequires:  python3-talloc-devel >= %{talloc_version}
37 BuildRequires:  python3-tdb >= %{tdb_version}
38 BuildRequires:  python3-tevent >= %{tevent_version}
39 BuildRequires:  rpmbuild(macros) >= 1.507
40 BuildRequires:  talloc-devel >= %{talloc_version}
41 BuildRequires:  tdb-devel >= %{tdb_version}
42 BuildRequires:  tevent-devel >= %{tevent_version}
43 %{?with_lmdb:Requires:  lmdb >= 0.9.16}
44 Requires:       talloc >= %{talloc_version}
45 Requires:       tdb >= %{tdb_version}
46 Requires:       tevent >= %{tevent_version}
47 Requires:       popt >= 1.6
48 Provides:       libldb = %{version}-%{release}
49 Obsoletes:      libldb < 1.1.0-3
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 # %{_includedir}/pyldb.h shared between python*-ldb-devel
53 %define         _duplicate_files_terminate_build        0
54
55 %description
56 An extensible library that implements an LDAP like API to access
57 remote LDAP servers, or use local tdb databases.
58
59 %description -l pl.UTF-8
60 Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
61 na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
62 danych tdb.
63
64 %package tools
65 Summary:        Tools to manage LDB files
66 Summary(pl.UTF-8):      Narzędzia do zarządzania plikami LDB
67 Group:          Applications/Databases
68 Requires:       %{name} = %{version}-%{release}
69
70 %description tools
71 Tools to manage LDB files.
72
73 %description tools -l pl.UTF-8
74 Narzędzia do zarządzania plikami LDB.
75
76 %package devel
77 Summary:        Header files for the LDB library
78 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki LDB
79 Group:          Development/Libraries
80 Requires:       %{name} = %{version}-%{release}
81 Requires:       talloc-devel >= %{talloc_version}
82 Requires:       tdb-devel >= %{tdb_version}
83 Requires:       tevent-devel >= %{tevent_version}
84 Provides:       libldb-devel = %{version}-%{release}
85 Obsoletes:      libldb-devel < 1.1.0-3
86
87 %description devel
88 Header files needed to develop programs that link against the LDB
89 library.
90
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
93 bibliotekę LDB.
94
95 %package -n python-ldb
96 Summary:        Python 2 bindings for the LDB library
97 Summary(pl.UTF-8):      Wiązania Pythona 2 do biblioteki LDB
98 Group:          Libraries/Python
99 Requires:       %{name} = %{version}-%{release}
100 Requires:       python-libs >= 1:2.4.2
101 Requires:       python-tdb >= %{tdb_version}
102 Obsoletes:      pyldb
103
104 %description -n python-ldb
105 Python 2 bindings for the LDB library.
106
107 %description -n python-ldb -l pl.UTF-8
108 Wiązania Pythona 2 do biblioteki LDB.
109
110 %package -n python-ldb-devel
111 Summary:        Development files for the Python 2 bindings for the LDB library
112 Summary(pl.UTF-8):      Pliki programistyczne wiązań Pythona 2 do biblioteki LDB
113 Group:          Development/Libraries
114 Requires:       python-ldb = %{version}-%{release}
115
116 %description -n python-ldb-devel
117 Development files for the Python 2 bindings for the LDB library.
118
119 %description -n python-ldb-devel -l pl.UTF-8
120 Pliki programistyczne wiązań Pythona 2 do biblioteki LDB.
121
122 %package -n python3-ldb
123 Summary:        Python 3 bindings for the LDB library
124 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki LDB
125 Group:          Libraries/Python
126 Requires:       %{name} = %{version}-%{release}
127 Requires:       python3-tdb >= %{tdb_version}
128 Obsoletes:      pyldb
129
130 %description -n python3-ldb
131 Python 3 bindings for the LDB library.
132
133 %description -n python3-ldb -l pl.UTF-8
134 Wiązania Pythona 3 do biblioteki LDB.
135
136 %package -n python3-ldb-devel
137 Summary:        Development files for the Python 3 bindings for the LDB library
138 Summary(pl.UTF-8):      Pliki programistyczne wiązań Pythona 3 do biblioteki LDB
139 Group:          Development/Libraries
140 Requires:       python3-ldb = %{version}-%{release}
141
142 %description -n python3-ldb-devel
143 Development files for the Python 3 bindings for the LDB library.
144
145 %description -n python3-ldb-devel -l pl.UTF-8
146 Pliki programistyczne wiązań Pythona 3 do biblioteki LDB.
147
148 %prep
149 %setup -q
150
151 %build
152 CC="%{__cc}" \
153 CFLAGS="%{rpmcflags}" \
154 ./configure \
155         --prefix=%{_prefix} \
156         --libdir=%{_libdir} \
157         --with-modulesdir=%{_libdir}/ldb/modules \
158         --with-privatelibdir=%{_libdir}/ldb \
159         --bundled-libraries=NONE \
160         --disable-rpath \
161         --disable-rpath-install \
162         %{?with_python2:--extra-python=%{__python}}
163
164 %{__make} \
165         V=1
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169 %{__make} install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 %if %{with python2}
173 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
174 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
175 %py_postclean
176 %endif
177
178 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
179 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
180
181 # Shared libraries need to be marked executable for
182 # rpmbuild to strip them and include them in debuginfo
183 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %post   -p /sbin/ldconfig
189 %postun -p /sbin/ldconfig
190
191 %post   -n python-ldb -p /sbin/ldconfig
192 %postun -n python-ldb -p /sbin/ldconfig
193
194 %post   -n python3-ldb -p /sbin/ldconfig
195 %postun -n python3-ldb -p /sbin/ldconfig
196
197 %files
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
200 %attr(755,root,root) %ghost %{_libdir}/libldb.so.1
201 %dir %{_libdir}/ldb
202 %attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
203 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so
204 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so
205 %{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
206 %dir %{_libdir}/ldb/modules
207 %dir %{_libdir}/ldb/modules/ldb
208 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
209
210 %files tools
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_bindir}/ldbadd
213 %attr(755,root,root) %{_bindir}/ldbdel
214 %attr(755,root,root) %{_bindir}/ldbedit
215 %attr(755,root,root) %{_bindir}/ldbmodify
216 %attr(755,root,root) %{_bindir}/ldbrename
217 %attr(755,root,root) %{_bindir}/ldbsearch
218 %attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
219 %{_mandir}/man1/ldbadd.1*
220 %{_mandir}/man1/ldbdel.1*
221 %{_mandir}/man1/ldbedit.1*
222 %{_mandir}/man1/ldbmodify.1*
223 %{_mandir}/man1/ldbrename.1*
224 %{_mandir}/man1/ldbsearch.1*
225
226 %files devel
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/libldb.so
229 %{_includedir}/ldb_module.h
230 %{_includedir}/ldb_handlers.h
231 %{_includedir}/ldb_errors.h
232 %{_includedir}/ldb_version.h
233 %{_includedir}/ldb.h
234 %{_pkgconfigdir}/ldb.pc
235 %{_mandir}/man3/ldb.3*
236
237 %if %{with python2}
238 %files -n python-ldb
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libpyldb-util.so.*.*.*
241 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.so.1
242 %attr(755,root,root) %{py_sitedir}/ldb.so
243 %{py_sitedir}/_ldb_text.py[co]
244
245 %files -n python-ldb-devel
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libpyldb-util.so
248 %{_includedir}/pyldb.h
249 %{_pkgconfigdir}/pyldb-util.pc
250 %endif
251
252 %files -n python3-ldb
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.*
255 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.1
256 %attr(755,root,root) %{py3_sitedir}/ldb.cpython-*.so
257 %{py3_sitedir}/_ldb_text.py
258 %{py3_sitedir}/__pycache__/_ldb_text.cpython-*.py[co]
259
260 %files -n python3-ldb-devel
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so
263 %{_includedir}/pyldb.h
264 %{_pkgconfigdir}/pyldb-util.cpython-3*.pc
This page took 0.07125 seconds and 3 git commands to generate.