1 %define talloc_version 2.0.5
2 %define tdb_version 1.2.9
3 %define tevent_version 0.9.12
4 Summary: A schema-less, ldap like, API and database
9 Group: Development/Libraries
10 URL: http://ldb.samba.org/
11 Source0: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
12 # Source0-md5: 61145ad9cfe017ce4fca5cbc77b9552b
13 BuildRequires: autoconf
14 BuildRequires: docbook-style-xsl
15 BuildRequires: libtalloc-devel >= %{talloc_version}
16 BuildRequires: libxslt
17 BuildRequires: popt-devel
18 BuildRequires: python-devel
19 BuildRequires: python-talloc-devel
20 BuildRequires: python-tdb
21 BuildRequires: tdb-devel >= %{tdb_version}
22 BuildRequires: tevent-devel >= %{tevent_version}
23 Requires: libtalloc >= %{talloc_version}
24 Requires: tdb >= %{tdb_version}
25 Requires: tevent >= %{tevent_version}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 An extensible library that implements an LDAP like API to access
30 remote LDAP servers, or use local tdb databases.
33 Summary: Tools to manage LDB files
34 Group: Development/Libraries
35 Requires: %{name} = %{version}-%{release}
37 %description -n ldb-tools
38 Tools to manage LDB files.
41 Summary: Developer tools for the LDB library
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
44 Requires: libtalloc-devel >= %{talloc_version}
46 Requires: tdb-devel >= %{tdb_version}
47 Requires: tevent-devel >= %{tevent_version}
50 Header files needed to develop programs that link against the LDB
53 %package -n python-ldb
54 Summary: Python bindings for the LDB library
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
57 Requires: python-tdb = %{tdb_version}
60 %description -n python-ldb
61 Python bindings for the LDB library.
63 %package -n python-ldb-devel
64 Summary: Development files for the Python bindings for the LDB library
65 Group: Development/Libraries
66 Requires: pyldb = %{version}-%{release}
68 %description -n python-ldb-devel
69 Development files for the Python bindings for the LDB library
72 %setup -q -n ldb-%{version}
75 # note: configure in fact is waf call
77 CFLAGS="%{rpmcflags}" \
78 PYTHONDIR=%{py_sitedir} \
82 --with-modulesdir=%{_libdir}/ldb/modules \
83 --with-privatelibdir=%{_libdir}/ldb \
84 --bundled-libraries=NONE \
86 --disable-rpath-install
92 rm -rf $RPM_BUILD_ROOT
94 DESTDIR=$RPM_BUILD_ROOT
96 # Remove _tevent.so (it's managed by python-tevent)
97 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so
99 # Shared libraries need to be marked executable for
100 # rpmbuild to strip them and include them in debuginfo
101 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
104 rm -rf $RPM_BUILD_ROOT
106 %post -p /sbin/ldconfig
107 %postun -p /sbin/ldconfig
109 %post -n python-ldb -p /sbin/ldconfig
110 %postun -n python-ldb -p /sbin/ldconfig
113 %defattr(644,root,root,755)
115 %{_libdir}/libldb.so.*
116 %dir %{_libdir}/ldb/modules
117 %dir %{_libdir}/ldb/modules/ldb
118 %{_libdir}/ldb/modules/ldb/*.so
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_bindir}/ldbadd
123 %attr(755,root,root) %{_bindir}/ldbdel
124 %attr(755,root,root) %{_bindir}/ldbedit
125 %attr(755,root,root) %{_bindir}/ldbmodify
126 %attr(755,root,root) %{_bindir}/ldbrename
127 %attr(755,root,root) %{_bindir}/ldbsearch
128 %{_libdir}/ldb/libldb-cmdline.so
129 %{_mandir}/man1/ldbadd.1.*
130 %{_mandir}/man1/ldbdel.1.*
131 %{_mandir}/man1/ldbedit.1.*
132 %{_mandir}/man1/ldbmodify.1.*
133 %{_mandir}/man1/ldbrename.1.*
134 %{_mandir}/man1/ldbsearch.1.*
137 %defattr(644,root,root,755)
138 %{_includedir}/ldb_module.h
139 %{_includedir}/ldb_handlers.h
140 %{_includedir}/ldb_errors.h
141 %{_includedir}/ldb_version.h
145 %{_pkgconfigdir}/ldb.pc
146 %{_mandir}/man3/ldb.3*
149 %defattr(644,root,root,755)
151 %{_libdir}/libpyldb-util.so.1*
153 %files -n python-ldb-devel
154 %defattr(644,root,root,755)
155 %{_includedir}/pyldb.h
156 %{_libdir}/libpyldb-util.so
157 %{_pkgconfigdir}/pyldb-util.pc