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.3.3
10 %define tdb_version 2:1.4.4
11 %define tevent_version 0.11.0
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: c7fc9d1d43b801d3932484b1de7442fe
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: popt-devel >= 1.6
30 BuildRequires: python3-devel >= 1:3.2
31 BuildRequires: python3-talloc-devel >= %{talloc_version}
32 BuildRequires: python3-tdb >= %{tdb_version}
33 BuildRequires: python3-tevent >= %{tevent_version}
34 BuildRequires: rpmbuild(macros) >= 1.704
35 BuildRequires: talloc-devel >= %{talloc_version}
36 BuildRequires: tdb-devel >= %{tdb_version}
37 BuildRequires: tevent-devel >= %{tevent_version}
38 %{?with_lmdb:Requires: lmdb-libs >= 0.9.16}
39 Requires: talloc >= %{talloc_version}
40 Requires: tdb >= %{tdb_version}
41 Requires: tevent >= %{tevent_version}
43 Provides: libldb = %{version}-%{release}
44 Obsoletes: libldb < 1.1.0-3
45 # ldb 1.6+ dropped python2 support
46 Obsoletes: python-ldb < 1.6
47 Obsoletes: python-ldb-devel < 1.6
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 An extensible library that implements an LDAP like API to access
52 remote LDAP servers, or use local tdb databases.
54 %description -l pl.UTF-8
55 Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
56 na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
60 Summary: Tools to manage LDB files
61 Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB
62 Group: Applications/Databases
63 Requires: %{name} = %{version}-%{release}
66 Tools to manage LDB files.
68 %description tools -l pl.UTF-8
69 Narzędzia do zarządzania plikami LDB.
72 Summary: Header files for the LDB library
73 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
76 Requires: talloc-devel >= %{talloc_version}
77 Requires: tdb-devel >= %{tdb_version}
78 Requires: tevent-devel >= %{tevent_version}
79 Provides: libldb-devel = %{version}-%{release}
80 Obsoletes: libldb-devel < 1.1.0-3
83 Header files needed to develop programs that link against the LDB
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
90 %package -n python3-ldb
91 Summary: Python 3 bindings for the LDB library
92 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki LDB
93 Group: Libraries/Python
94 Requires: %{name} = %{version}-%{release}
95 Requires: python3-tdb >= %{tdb_version}
96 Obsoletes: pyldb < 1.1.0-1
98 %description -n python3-ldb
99 Python 3 bindings for the LDB library.
101 %description -n python3-ldb -l pl.UTF-8
102 Wiązania Pythona 3 do biblioteki LDB.
104 %package -n python3-ldb-devel
105 Summary: Development files for the Python 3 bindings for the LDB library
106 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona 3 do biblioteki LDB
107 Group: Development/Libraries
108 Requires: python3-ldb = %{version}-%{release}
110 %description -n python3-ldb-devel
111 Development files for the Python 3 bindings for the LDB library.
113 %description -n python3-ldb-devel -l pl.UTF-8
114 Pliki programistyczne wiązań Pythona 3 do biblioteki LDB.
121 CFLAGS="%{rpmcflags}" \
123 --prefix=%{_prefix} \
124 --libdir=%{_libdir} \
125 --with-modulesdir=%{_libdir}/ldb/modules \
126 --with-privatelibdir=%{_libdir}/ldb \
127 --bundled-libraries=NONE \
129 --disable-rpath-install
135 rm -rf $RPM_BUILD_ROOT
137 DESTDIR=$RPM_BUILD_ROOT
139 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
140 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
142 # Shared libraries need to be marked executable for
143 # rpmbuild to strip them and include them in debuginfo
144 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
147 rm -rf $RPM_BUILD_ROOT
149 %post -p /sbin/ldconfig
150 %postun -p /sbin/ldconfig
152 %post -n python3-ldb -p /sbin/ldconfig
153 %postun -n python3-ldb -p /sbin/ldconfig
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libldb.so.2
160 %attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
161 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-err-map.so
162 %attr(755,root,root) %{_libdir}/ldb/libldb-tdb-int.so
163 %{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
164 %dir %{_libdir}/ldb/modules
165 %dir %{_libdir}/ldb/modules/ldb
166 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/ldbadd
171 %attr(755,root,root) %{_bindir}/ldbdel
172 %attr(755,root,root) %{_bindir}/ldbedit
173 %attr(755,root,root) %{_bindir}/ldbmodify
174 %attr(755,root,root) %{_bindir}/ldbrename
175 %attr(755,root,root) %{_bindir}/ldbsearch
176 %attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
177 %{_mandir}/man1/ldbadd.1*
178 %{_mandir}/man1/ldbdel.1*
179 %{_mandir}/man1/ldbedit.1*
180 %{_mandir}/man1/ldbmodify.1*
181 %{_mandir}/man1/ldbrename.1*
182 %{_mandir}/man1/ldbsearch.1*
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_libdir}/libldb.so
187 %{_includedir}/ldb_module.h
188 %{_includedir}/ldb_handlers.h
189 %{_includedir}/ldb_errors.h
190 %{_includedir}/ldb_version.h
192 %{_pkgconfigdir}/ldb.pc
193 %{_mandir}/man3/ldb.3*
195 %files -n python3-ldb
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so.*.*.*
198 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.cpython-3*.so.2
199 %attr(755,root,root) %{py3_sitedir}/ldb.cpython-*.so
200 %{py3_sitedir}/_ldb_text.py
201 %{py3_sitedir}/__pycache__/_ldb_text.cpython-*.py[co]
203 %files -n python3-ldb-devel
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libdir}/libpyldb-util.cpython-3*.so
206 %{_includedir}/pyldb.h
207 %{_pkgconfigdir}/pyldb-util.cpython-3*.pc