2 # - ld.bfd enforced because gold does not understand '!' in version script (binutils-3:2.21.53.0.1-1)
4 %ifarch %{x8664} alpha mips64 ppc64 s390x sparc64
5 # lmdb support requires 64-bit size_t
8 %define talloc_version 2:2.1.14
9 %define tdb_version 2:1.3.16
10 %define tevent_version 0.9.37
11 Summary: LDAP-like embedded database
12 Summary(pl.UTF-8): Wbudowana baza danych podobna do LDAP
18 Source0: https://www.samba.org/ftp/ldb/%{name}-%{version}.tar.gz
19 # Source0-md5: 3951773a4fed1b3ae27af24972c2ac50
20 URL: https://ldb.samba.org/
21 BuildRequires: cmocka-devel >= 1.1.1
22 BuildRequires: docbook-style-xsl
23 BuildRequires: libxslt
24 %{?with_lmdb:BuildRequires: lmdb-devel >= 0.9.16}
25 BuildRequires: openldap-devel
26 BuildRequires: popt-devel >= 1.6
27 BuildRequires: python-devel >= 1:2.4.2
28 BuildRequires: python-talloc-devel >= %{talloc_version}
29 BuildRequires: python-tdb >= %{tdb_version}
30 BuildRequires: python-tevent >= %{tevent_version}
31 BuildRequires: rpmbuild(macros) >= 1.219
32 BuildRequires: talloc-devel >= %{talloc_version}
33 BuildRequires: tdb-devel >= %{tdb_version}
34 BuildRequires: tevent-devel >= %{tevent_version}
35 %{?with_lmdb:Requires: lmdb >= 0.9.16}
36 Requires: talloc >= %{talloc_version}
37 Requires: tdb >= %{tdb_version}
38 Requires: tevent >= %{tevent_version}
40 Provides: libldb = %{version}-%{release}
41 Obsoletes: libldb < 1.1.0-3
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 An extensible library that implements an LDAP like API to access
46 remote LDAP servers, or use local tdb databases.
48 %description -l pl.UTF-8
49 Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
50 na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
54 Summary: Tools to manage LDB files
55 Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB
56 Group: Applications/Databases
57 Requires: %{name} = %{version}-%{release}
60 Tools to manage LDB files.
62 %description tools -l pl.UTF-8
63 Narzędzia do zarządzania plikami LDB.
66 Summary: Header files for the LDB library
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
70 Requires: talloc-devel >= %{talloc_version}
71 Requires: tdb-devel >= %{tdb_version}
72 Requires: tevent-devel >= %{tevent_version}
73 Provides: libldb-devel = %{version}-%{release}
74 Obsoletes: libldb-devel < 1.1.0-3
77 Header files needed to develop programs that link against the LDB
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
84 %package -n python-ldb
85 Summary: Python bindings for the LDB library
86 Summary(pl.UTF-8): Wiązania Pythona do biblioteki LDB
87 Group: Libraries/Python
88 Requires: %{name} = %{version}-%{release}
89 Requires: python-libs >= 1:2.4.2
90 Requires: python-tdb >= %{tdb_version}
93 %description -n python-ldb
94 Python bindings for the LDB library.
96 %description -n python-ldb -l pl.UTF-8
97 Wiązania Pythona do biblioteki LDB.
99 %package -n python-ldb-devel
100 Summary: Development files for the Python bindings for the LDB library
101 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona do biblioteki LDB
102 Group: Development/Libraries
103 Requires: python-ldb = %{version}-%{release}
105 %description -n python-ldb-devel
106 Development files for the Python bindings for the LDB library.
108 %description -n python-ldb-devel -l pl.UTF-8
109 Pliki programistyczne wiązań Pythona do biblioteki LDB.
116 CFLAGS="%{rpmcflags}" \
117 LDFLAGS="%{rpmldflags} -fuse-ld=bfd" \
118 PYTHONDIR=%{py_sitedir} \
120 --prefix=%{_prefix} \
121 --libdir=%{_libdir} \
122 --with-modulesdir=%{_libdir}/ldb/modules \
123 --with-privatelibdir=%{_libdir}/ldb \
124 --bundled-libraries=NONE \
126 --disable-rpath-install
132 rm -rf $RPM_BUILD_ROOT
134 DESTDIR=$RPM_BUILD_ROOT
136 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
137 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
140 # Shared libraries need to be marked executable for
141 # rpmbuild to strip them and include them in debuginfo
142 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
145 rm -rf $RPM_BUILD_ROOT
147 %post -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
150 %post -n python-ldb -p /sbin/ldconfig
151 %postun -n python-ldb -p /sbin/ldconfig
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
156 %attr(755,root,root) %ghost %{_libdir}/libldb.so.1
158 %attr(755,root,root) %{_libdir}/ldb/libldb-key-value.so
159 %{?with_lmdb:%attr(755,root,root) %{_libdir}/ldb/libldb-mdb-int.so}
160 %dir %{_libdir}/ldb/modules
161 %dir %{_libdir}/ldb/modules/ldb
162 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/ldbadd
167 %attr(755,root,root) %{_bindir}/ldbdel
168 %attr(755,root,root) %{_bindir}/ldbedit
169 %attr(755,root,root) %{_bindir}/ldbmodify
170 %attr(755,root,root) %{_bindir}/ldbrename
171 %attr(755,root,root) %{_bindir}/ldbsearch
172 %attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
173 %{_mandir}/man1/ldbadd.1*
174 %{_mandir}/man1/ldbdel.1*
175 %{_mandir}/man1/ldbedit.1*
176 %{_mandir}/man1/ldbmodify.1*
177 %{_mandir}/man1/ldbrename.1*
178 %{_mandir}/man1/ldbsearch.1*
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libldb.so
183 %{_includedir}/ldb_module.h
184 %{_includedir}/ldb_handlers.h
185 %{_includedir}/ldb_errors.h
186 %{_includedir}/ldb_version.h
188 %{_pkgconfigdir}/ldb.pc
189 %{_mandir}/man3/ldb.3*
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/libpyldb-util.so.*.*.*
194 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.so.1
195 %attr(755,root,root) %{py_sitedir}/ldb.so
196 %{py_sitedir}/_ldb_text.py[co]
198 %files -n python-ldb-devel
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_libdir}/libpyldb-util.so
201 %{_includedir}/pyldb.h
202 %{_pkgconfigdir}/pyldb-util.pc