4c16553
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
4c16553
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
4c16553
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
4c16553
%endif
4c16553
7d874e0
%define talloc_version 2.0.7
38a3c0a
%define tdb_version 1.2.10
38a3c0a
%define tevent_version 0.9.15
4c16553
4c16553
Name: libldb
3c91061
Version: 1.1.8
38a3c0a
Release: 1%{?dist}
4c16553
Group: Development/Libraries
4c16553
Summary: A schema-less, ldap like, API and database
4c16553
Requires: libtalloc >= %{talloc_version}
4c16553
Requires: libtdb >= %{tdb_version}
4c16553
Requires: libtevent >= %{tevent_version}
4c16553
License: LGPLv3+
4c16553
URL: http://ldb.samba.org/
4c16553
Source: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
4c16553
4c16553
BuildRequires: libtalloc-devel >= %{talloc_version}
4c16553
BuildRequires: libtdb-devel >= %{tdb_version}
4c16553
BuildRequires: libtevent-devel >= %{tevent_version}
4c16553
%{?fedora:BuildRequires: popt-devel}
4c16553
%if 0%{?rhel} <= 5
4c16553
BuildRequires: popt
4c16553
%endif
4c16553
%if 0%{?rhel} >= 6
4c16553
BuildRequires: popt-devel
4c16553
%endif
4c16553
BuildRequires: autoconf
4c16553
BuildRequires: libxslt
4c16553
BuildRequires: docbook-style-xsl
4c16553
BuildRequires: python-devel
4c16553
BuildRequires: python-tdb
4c16553
BuildRequires: pytalloc-devel
e94d5d7
BuildRequires: python-tevent
a66f0fd
BuildRequires: doxygen
4c16553
f607e37
Provides: bundled(libreplace)
f607e37
Provides: bundled(libtdb_compat)
f607e37
4c16553
# Patches
e94d5d7
4c16553
%description
4c16553
An extensible library that implements an LDAP like API to access remote LDAP
4c16553
servers, or use local tdb databases.
4c16553
fd922ff
%package -n ldb-tools
4c16553
Group: Development/Libraries
4c16553
Summary: Tools to manage LDB files
4c16553
Requires: libldb = %{version}-%{release}
4c16553
fd922ff
%description -n ldb-tools
4c16553
Tools to manage LDB files
4c16553
4c16553
%package devel
4c16553
Group: Development/Libraries
4c16553
Summary: Developer tools for the LDB library
4c16553
Requires: libldb = %{version}-%{release}
4c16553
Requires: libtdb-devel >= %{tdb_version}
4c16553
Requires: libtalloc-devel >= %{talloc_version}
4c16553
Requires: libtevent-devel >= %{tevent_version}
4c16553
Requires: pkgconfig
4c16553
4c16553
%description devel
4c16553
Header files needed to develop programs that link against the LDB library.
4c16553
4c16553
%package -n pyldb
4c16553
Group: Development/Libraries
4c16553
Summary: Python bindings for the LDB library
4c16553
Requires: libldb = %{version}-%{release}
4c16553
Requires: python-tdb = %{tdb_version}
4c16553
4c16553
%description -n pyldb
4c16553
Python bindings for the LDB library
4c16553
4c16553
%package -n pyldb-devel
4c16553
Group: Development/Libraries
4c16553
Summary: Development files for the Python bindings for the LDB library
4c16553
Requires: pyldb = %{version}-%{release}
4c16553
4c16553
%description -n pyldb-devel
4c16553
Development files for the Python bindings for the LDB library
4c16553
4c16553
%prep
4c16553
%setup -q -n ldb-%{version}
e94d5d7
4c16553
%build
f607e37
a414d69
%configure --disable-rpath \
a414d69
           --disable-rpath-install \
4c16553
           --bundled-libraries=NONE \
3c91061
           --builtin-libraries=replace \
4c16553
           --with-modulesdir=%{_libdir}/ldb/modules \
3c91061
           --with-privatelibdir=%{_libdir}/ldb
4c16553
38a3c0a
# Don't build with multiple processors
38a3c0a
# It breaks due to a threading issue in WAF
38a3c0a
make V=1
a66f0fd
doxygen Doxyfile
4c16553
4c16553
%install
4c16553
make install DESTDIR=%{buildroot}
4c16553
4c16553
rm -f %{buildroot}%{_libdir}/libldb.a
4c16553
4c16553
# Shared libraries need to be marked executable for
4c16553
# rpmbuild to strip them and include them in debuginfo
4c16553
find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
4c16553
a66f0fd
# Install API docs
a66f0fd
cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir}
a66f0fd
3c91061
# LDB 1.1.8 bug: remove manpage named after full
3c91061
# file path
3c91061
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
3c91061
4c16553
%clean
4c16553
rm -rf %{buildroot}
4c16553
4c16553
%post -p /sbin/ldconfig
4c16553
4c16553
%postun -p /sbin/ldconfig
4c16553
4c16553
%files
4c16553
%defattr(-,root,root,-)
4c16553
%dir %{_libdir}/ldb
4c16553
%{_libdir}/libldb.so.*
fd922ff
%dir %{_libdir}/ldb/modules
fd922ff
%dir %{_libdir}/ldb/modules/ldb
4c16553
%{_libdir}/ldb/modules/ldb/*.so
4c16553
fd922ff
%files -n ldb-tools
4c16553
%defattr(-,root,root,-)
4c16553
%{_bindir}/ldbadd
4c16553
%{_bindir}/ldbdel
4c16553
%{_bindir}/ldbedit
4c16553
%{_bindir}/ldbmodify
4c16553
%{_bindir}/ldbrename
4c16553
%{_bindir}/ldbsearch
fd922ff
%{_libdir}/ldb/libldb-cmdline.so
4c16553
%{_mandir}/man1/ldbadd.1.*
4c16553
%{_mandir}/man1/ldbdel.1.*
4c16553
%{_mandir}/man1/ldbedit.1.*
4c16553
%{_mandir}/man1/ldbmodify.1.*
4c16553
%{_mandir}/man1/ldbrename.1.*
4c16553
%{_mandir}/man1/ldbsearch.1.*
4c16553
4c16553
%files devel
4c16553
%defattr(-,root,root,-)
4c16553
%{_includedir}/ldb_module.h
4c16553
%{_includedir}/ldb_handlers.h
4c16553
%{_includedir}/ldb_errors.h
fd922ff
%{_includedir}/ldb_version.h
4c16553
%{_includedir}/ldb.h
4c16553
%{_libdir}/libldb.so
4c16553
4c16553
%{_libdir}/pkgconfig/ldb.pc
a66f0fd
%{_mandir}/man3/ldb*.gz
38a3c0a
%{_mandir}/man3/ldif*.gz
4c16553
4c16553
%files -n pyldb
4c16553
%defattr(-,root,root,-)
4c16553
%{python_sitearch}/ldb.so
fd922ff
%{_libdir}/libpyldb-util.so.1*
4c16553
4c16553
%files -n pyldb-devel
4c16553
%defattr(-,root,root,-)
4c16553
%{_includedir}/pyldb.h
4c16553
%{_libdir}/libpyldb-util.so
4c16553
%{_libdir}/pkgconfig/pyldb-util.pc
a66f0fd
%{_mandir}/man*/Py*.gz
4c16553
4c16553
%post -n pyldb -p /sbin/ldconfig
4c16553
%postun -n pyldb -p /sbin/ldconfig
4c16553
4c16553
%changelog
3c91061
* Tue Jul 10 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.1.8-1
3c91061
- New upstream release 1.1.8
3c91061
- Required for latest Samba 4 beta
3c91061
- Fixes for pyldb
3c91061
- Revert to using tdb1 by default
3c91061
- Drop support for tdb_compat
3c91061
- CCAN is no longer built as a static library
3c91061
38a3c0a
* Tue May 22 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.1.6-1
38a3c0a
- New upstream release 1.1.6
38a3c0a
- Drop upstream patches
38a3c0a
- Required for upcoming Samba 4 beta
38a3c0a
- Explicitly build with tdb1 support
38a3c0a
fa3d9ab
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
fa3d9ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fa3d9ab
38a3c0a
* Fri Dec 09 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.4-1.1
38a3c0a
- Do not build with multiple CPUs
38a3c0a
e94d5d7
* Tue Dec 06 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.4-1
e94d5d7
- New upstream release
e94d5d7
- Add ldb_module_error() routine
e94d5d7
- Fedora: work around unreliable configure check for pytevent
e94d5d7
- Drop patch to ignore --disable-silent-rules (included in tarball)
e94d5d7
408cd3a
* Thu Dec 01 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-4
408cd3a
- Add patch to ignore --disable-silent-rules
408cd3a
f607e37
* Wed Nov 23 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-3
f607e37
- Add explicit mention of the bundled libreplace
f607e37
- https://fedorahosted.org/fpc/ticket/120
f607e37
- Add explicit mention of bundled libtdb_compat and libccan
f607e37
- https://fedorahosted.org/fpc/ticket/119
f607e37
f607e37
* Mon Nov 21 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-2
a66f0fd
- Build and install API documentation
f607e37
- Build tdb_compat and ccan statically. They have no upstream releases to
f607e37
  link against yet and their API is in flux. It is unsafe to make them
f607e37
  public and shared at this time.
a66f0fd
f607e37
* Wed Nov 09 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.1.3-1
7d874e0
- New upstream release
7d874e0
- Required for building newer samba4 packages
7d874e0
de17f62
* Tue Aug  2 2011 Simo Sorce <ssorce@redhat.com> - 1.1.0-1
de17f62
- Update to 1.1.0
de17f62
  (dependency for samba4 alpha16 snapshot)
de17f62
ba7ae55
* Tue Feb 22 2011 Simo Sorce <ssorce@redhat.com> - 1.0.2-1
ba7ae55
- Update to 1.0.2
ba7ae55
  (dependency for samba4 alpha15 snapshot)
ba7ae55
a414d69
* Fri Feb 11 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.0.0-2
a414d69
- Disable rpath
a414d69
fd922ff
* Fri Feb 11 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.0.0-1
fd922ff
- New upstream release 1.0.0
fd922ff
- SOname bump to account for module loading changes
fd922ff
- Rename libldb-tools to ldb-tools to make upgrades easier
fd922ff
1ba86b5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.22-9
1ba86b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1ba86b5
4c16553
* Fri Feb 04 2011 Stephen Gallagher <sgallagh@redhat.com> - 0.9.22-8
4c16553
- Fixes from package review
4c16553
- Change Requires: on tools subpackage to be the exact version/release
4c16553
- Remove unnecessary BuildRoot directive
4c16553
4c16553
* Mon Jan 17 2011 Stephen Gallagher <sgallagh@redhat.com> - 0.9.22-7
4c16553
- Update to 0.9.22 (first independent release of libldb upstream)
4c16553