3 %bcond_without lmdb # LMDB module (64-bit only)
5 %ifnarch %{x8664} aarch64 alpha mips64 ppc64 s390x sparc64
6 # lmdb support requires 64-bit size_t
9 %define talloc_version 2:2.4.0
10 %define tdb_version 2:1.4.8
11 %define tevent_version 0.14.1
12 Summary: LDAP-like embedded database
13 Summary(pl.UTF-8): Wbudowana baza danych podobna do LDAP
19 Source0: https://download.samba.org/pub/ldb/%{name}-%{version}.tar.gz
20 # Source0-md5: e443a8da17758479c3b5c542e8e3ff1a
21 URL: https://ldb.samba.org/
22 BuildRequires: cmocka-devel >= 1.1.3
23 BuildRequires: docbook-style-xsl
24 BuildRequires: docbook-style-xsl-nons
25 BuildRequires: libbsd-devel
26 BuildRequires: libxslt-progs
27 %{?with_lmdb:BuildRequires: lmdb-devel >= 0.9.16}
28 BuildRequires: openldap-devel
29 BuildRequires: pkgconfig
30 BuildRequires: popt-devel >= 1.6
31 BuildRequires: python3-devel >= 1:3.6
32 BuildRequires: python3-talloc-devel >= %{talloc_version}
33 BuildRequires: python3-tdb >= %{tdb_version}
34 BuildRequires: python3-tevent >= %{tevent_version}
35 BuildRequires: rpmbuild(macros) >= 1.704
36 BuildRequires: talloc-devel >= %{talloc_version}
37 BuildRequires: tdb-devel >= %{tdb_version}
38 BuildRequires: tevent-devel >= %{tevent_version}
39 %{?with_lmdb:Requires: lmdb-libs >= 0.9.16}
40 Requires: talloc >= %{talloc_version}
41 Requires: tdb >= %{tdb_version}
42 Requires: tevent >= %{tevent_version}
44 Provides: libldb = %{version}-%{release}
45 Obsoletes: libldb < 1.1.0-3
46 # ldb 1.6+ dropped python2 support
47 Obsoletes: python-ldb < 1.6
48 Obsoletes: python-ldb-devel < 1.6
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 An extensible library that implements an LDAP like API to access
53 remote LDAP servers, or use local tdb databases.
55 %description -l pl.UTF-8
56 Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
57 na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
61 Summary: Tools to manage LDB files
62 Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB
63 Group: Applications/Databases
64 Requires: %{name} = %{version}-%{release}
67 Tools to manage LDB files.
69 %description tools -l pl.UTF-8
70 Narzędzia do zarządzania plikami LDB.
73 Summary: Header files for the LDB library
74 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB
75 Group: Development/Libraries
76 Requires: %{name} = %{version}-%{release}
77 Requires: talloc-devel >= %{talloc_version}
78 Requires: tdb-devel >= %{tdb_version}
79 Requires: tevent-devel >= %{tevent_version}
80 Provides: libldb-devel = %{version}-%{release}
81 Obsoletes: libldb-devel < 1.1.0-3
84 Header files needed to develop programs that link against the LDB
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
91 %package -n python3-ldb
92 Summary: Python 3 bindings for the LDB library
93 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki LDB
94 Group: Libraries/Python
95 Requires: %{name} = %{version}-%{release}
96 Requires: python3-tdb >= %{tdb_version}
97 Obsoletes: pyldb < 1.1.0-1
99 %description -n python3-ldb
100 Python 3 bindings for the LDB library.
102 %description -n python3-ldb -l pl.UTF-8
103 Wiązania Pythona 3 do biblioteki LDB.
105 %package -n python3-ldb-devel
106 Summary: Development files for the Python 3 bindings for the LDB library
107 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona 3 do biblioteki LDB
108 Group: Development/Libraries
109 Requires: python3-ldb = %{version}-%{release}
111 %description -n python3-ldb-devel
112 Development files for the Python 3 bindings for the LDB library.
114 %description -n python3-ldb-devel -l pl.UTF-8
115 Pliki programistyczne wiązań Pythona 3 do biblioteki LDB.
122 CFLAGS="%{rpmcflags}" \
124 --prefix=%{_prefix} \
125 --libdir=%{_libdir} \
126 --with-modulesdir=%{_libdir}/ldb/modules \
127 --with-privatelibdir=%{_libdir}/ldb \
128 --bundled-libraries=NONE \
130 --disable-rpath-install
136 rm -rf $RPM_BUILD_ROOT
138 DESTDIR=$RPM_BUILD_ROOT
140 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
141 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
143 # Shared libraries need to be marked executable for
144 # rpmbuild to strip them and include them in debuginfo
145 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
148 rm -rf $RPM_BUILD_ROOT
150 %post -p /sbin/ldconfig
151 %postun -p /sbin/ldconfig
153 %post -n python3-ldb -p /sbin/ldconfig
154 %postun -n python3-ldb -p /sbin/ldconfig
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
159 %attr(755,root,root) %ghost %{_libdir}/libldb.so.2
161 %attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
162 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so
163 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so
164 %{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
165 %dir %{_libdir}/ldb/modules
166 %dir %{_libdir}/ldb/modules/ldb
167 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/ldbadd
172 %attr(755,root,root) %{_bindir}/ldbdel
173 %attr(755,root,root) %{_bindir}/ldbedit
174 %attr(755,root,root) %{_bindir}/ldbmodify
175 %attr(755,root,root) %{_bindir}/ldbrename
176 %attr(755,root,root) %{_bindir}/ldbsearch
177 %attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
178 %{_mandir}/man1/ldbadd.1*
179 %{_mandir}/man1/ldbdel.1*
180 %{_mandir}/man1/ldbedit.1*
181 %{_mandir}/man1/ldbmodify.1*
182 %{_mandir}/man1/ldbrename.1*
183 %{_mandir}/man1/ldbsearch.1*
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_libdir}/libldb.so
188 %{_includedir}/ldb_module.h
189 %{_includedir}/ldb_handlers.h
190 %{_includedir}/ldb_errors.h
191 %{_includedir}/ldb_version.h
193 %{_pkgconfigdir}/ldb.pc
194 %{_mandir}/man3/ldb.3*
196 %files -n python3-ldb
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.*
199 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.2
200 %attr(755,root,root) %{py3_sitedir}/ldb.cpython-*.so
201 %{py3_sitedir}/_ldb_text.py
202 %{py3_sitedir}/__pycache__/_ldb_text.cpython-*.py[co]
204 %files -n python3-ldb-devel
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so
207 %{_includedir}/pyldb.h
208 %{_pkgconfigdir}/pyldb-util.cpython-3*.pc