1 # NOTE: for ldb 1.2.x see DEVEL branch (samba 4.6.x requires ldb < 1.2)
3 # - ld.bfd enforced because gold does not understand '!' in version script (binutils-3:2.21.53.0.1-1)
4 %define talloc_version 2:2.1.9
5 %define tdb_version 2:1.3.13
6 %define tevent_version 0.9.31
7 Summary: LDAP-like embedded database
8 Summary(pl.UTF-8): Wbudowana baza danych podobna do LDAP
14 Source0: https://www.samba.org/ftp/ldb/%{name}-%{version}.tar.gz
15 # Source0-md5: b25bf00ba877ff23fe0953a220d5249a
16 URL: https://ldb.samba.org/
17 BuildRequires: cmocka-devel >= 1.1.1
18 BuildRequires: docbook-style-xsl
19 BuildRequires: libxslt
20 BuildRequires: openldap-devel
21 BuildRequires: popt-devel >= 1.6
22 BuildRequires: python-devel >= 1:2.4.2
23 BuildRequires: python-talloc-devel >= %{talloc_version}
24 BuildRequires: python-tdb >= %{tdb_version}
25 BuildRequires: python-tevent >= %{tevent_version}
26 BuildRequires: rpmbuild(macros) >= 1.219
27 BuildRequires: talloc-devel >= %{talloc_version}
28 BuildRequires: tdb-devel >= %{tdb_version}
29 BuildRequires: tevent-devel >= %{tevent_version}
30 Requires: talloc >= %{talloc_version}
31 Requires: tdb >= %{tdb_version}
32 Requires: tevent >= %{tevent_version}
34 Provides: libldb = %{version}-%{release}
35 Obsoletes: libldb < 1.1.0-3
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 An extensible library that implements an LDAP like API to access
40 remote LDAP servers, or use local tdb databases.
42 %description -l pl.UTF-8
43 Rozszerzalna biblioteka implementująca API podobne do LDAP pozwalające
44 na dostęp do zdalnych serwerów LDAP lub wykorzystanie lokalnych baz
48 Summary: Tools to manage LDB files
49 Summary(pl.UTF-8): Narzędzia do zarządzania plikami LDB
50 Group: Applications/Databases
51 Requires: %{name} = %{version}-%{release}
54 Tools to manage LDB files.
56 %description tools -l pl.UTF-8
57 Narzędzia do zarządzania plikami LDB.
60 Summary: Header files for the LDB library
61 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LDB
62 Group: Development/Libraries
63 Requires: %{name} = %{version}-%{release}
64 Requires: talloc-devel >= %{talloc_version}
65 Requires: tdb-devel >= %{tdb_version}
66 Requires: tevent-devel >= %{tevent_version}
67 Provides: libldb-devel = %{version}-%{release}
68 Obsoletes: libldb-devel < 1.1.0-3
71 Header files needed to develop programs that link against the LDB
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe potrzebne do tworzenia programów wykorzystujących
78 %package -n python-ldb
79 Summary: Python bindings for the LDB library
80 Summary(pl.UTF-8): Wiązania Pythona do biblioteki LDB
81 Group: Libraries/Python
82 Requires: %{name} = %{version}-%{release}
83 Requires: python-libs >= 1:2.4.2
84 Requires: python-tdb >= %{tdb_version}
87 %description -n python-ldb
88 Python bindings for the LDB library.
90 %description -n python-ldb -l pl.UTF-8
91 Wiązania Pythona do biblioteki LDB.
93 %package -n python-ldb-devel
94 Summary: Development files for the Python bindings for the LDB library
95 Summary(pl.UTF-8): Pliki programistyczne wiązań Pythona do biblioteki LDB
96 Group: Development/Libraries
97 Requires: python-ldb = %{version}-%{release}
99 %description -n python-ldb-devel
100 Development files for the Python bindings for the LDB library.
102 %description -n python-ldb-devel -l pl.UTF-8
103 Pliki programistyczne wiązań Pythona do biblioteki LDB.
110 CFLAGS="%{rpmcflags}" \
111 LDFLAGS="%{rpmldflags} -fuse-ld=bfd" \
112 PYTHONDIR=%{py_sitedir} \
114 --prefix=%{_prefix} \
115 --libdir=%{_libdir} \
116 --with-modulesdir=%{_libdir}/ldb/modules \
117 --with-privatelibdir=%{_libdir}/ldb \
118 --bundled-libraries=NONE \
120 --disable-rpath-install
126 rm -rf $RPM_BUILD_ROOT
128 DESTDIR=$RPM_BUILD_ROOT
130 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
131 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
134 # Shared libraries need to be marked executable for
135 # rpmbuild to strip them and include them in debuginfo
136 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';'
139 rm -rf $RPM_BUILD_ROOT
141 %post -p /sbin/ldconfig
142 %postun -p /sbin/ldconfig
144 %post -n python-ldb -p /sbin/ldconfig
145 %postun -n python-ldb -p /sbin/ldconfig
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/libldb.so.*.*.*
150 %attr(755,root,root) %ghost %{_libdir}/libldb.so.1
152 %dir %{_libdir}/ldb/modules
153 %dir %{_libdir}/ldb/modules/ldb
154 %attr(755,root,root) %{_libdir}/ldb/modules/ldb/*.so
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/ldbadd
159 %attr(755,root,root) %{_bindir}/ldbdel
160 %attr(755,root,root) %{_bindir}/ldbedit
161 %attr(755,root,root) %{_bindir}/ldbmodify
162 %attr(755,root,root) %{_bindir}/ldbrename
163 %attr(755,root,root) %{_bindir}/ldbsearch
164 %attr(755,root,root) %{_libdir}/ldb/libldb-cmdline.so
165 %{_mandir}/man1/ldbadd.1*
166 %{_mandir}/man1/ldbdel.1*
167 %{_mandir}/man1/ldbedit.1*
168 %{_mandir}/man1/ldbmodify.1*
169 %{_mandir}/man1/ldbrename.1*
170 %{_mandir}/man1/ldbsearch.1*
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libldb.so
175 %{_includedir}/ldb_module.h
176 %{_includedir}/ldb_handlers.h
177 %{_includedir}/ldb_errors.h
178 %{_includedir}/ldb_version.h
180 %{_pkgconfigdir}/ldb.pc
181 %{_mandir}/man3/ldb.3*
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libpyldb-util.so.*.*.*
186 %attr(755,root,root) %ghost %{_libdir}/libpyldb-util.so.1
187 %attr(755,root,root) %{py_sitedir}/ldb.so
188 %{py_sitedir}/_ldb_text.py[co]
190 %files -n python-ldb-devel
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/libpyldb-util.so
193 %{_includedir}/pyldb.h
194 %{_pkgconfigdir}/pyldb-util.pc