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