2 # - really fix the version script error (version-script.patch)
3 %define talloc_version 2.0.5
4 %define tdb_version 1.2.9
5 %define tevent_version 0.9.12
6 Summary: A schema-less, ldap like, API and database
11 Group: Development/Libraries
12 URL: http://ldb.samba.org/
13 Source0: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
14 # Source0-md5: 61145ad9cfe017ce4fca5cbc77b9552b
15 Patch0: version-script.patch
16 BuildRequires: autoconf
17 BuildRequires: docbook-style-xsl
18 BuildRequires: libtalloc-devel >= %{talloc_version}
19 BuildRequires: libxslt
20 BuildRequires: popt-devel
21 BuildRequires: python-devel
22 BuildRequires: python-talloc-devel
23 BuildRequires: python-tdb
24 BuildRequires: tdb-devel >= %{tdb_version}
25 BuildRequires: tevent-devel >= %{tevent_version}
26 Requires: libtalloc >= %{talloc_version}
27 Requires: tdb >= %{tdb_version}
28 Requires: tevent >= %{tevent_version}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 An extensible library that implements an LDAP like API to access
33 remote LDAP servers, or use local tdb databases.
36 Summary: Tools to manage LDB files
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
40 %description -n ldb-tools
41 Tools to manage LDB files.
44 Summary: Developer tools for the LDB library
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
47 Requires: libtalloc-devel >= %{talloc_version}
49 Requires: tdb-devel >= %{tdb_version}
50 Requires: tevent-devel >= %{tevent_version}
53 Header files needed to develop programs that link against the LDB
56 %package -n python-ldb
57 Summary: Python bindings for the LDB library
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: python-tdb = %{tdb_version}
63 %description -n python-ldb
64 Python bindings for the LDB library.
66 %package -n python-ldb-devel
67 Summary: Development files for the Python bindings for the LDB library
68 Group: Development/Libraries
69 Requires: pyldb = %{version}-%{release}
71 %description -n python-ldb-devel
72 Development files for the Python bindings for the LDB library
75 %setup -q -n ldb-%{version}
80 install -d $(pwd)/ld-bin
81 ln -s %{_bindir}/ld.bfd $(pwd)/ld-bin/ld
83 # note: configure in fact is waf call
84 PATH=$(pwd)/ld-bin:$PATH \
85 COMPILER_PATH=$(pwd)/ld-bin \
87 CFLAGS="%{rpmcflags}" \
88 PYTHONDIR=%{py_sitedir} \
92 --with-modulesdir=%{_libdir}/ldb/modules \
93 --with-privatelibdir=%{_libdir}/ldb \
94 --bundled-libraries=NONE \
96 --disable-rpath-install
102 rm -rf $RPM_BUILD_ROOT
104 DESTDIR=$RPM_BUILD_ROOT
106 # Remove _tevent.so (it's managed by python-tevent)
107 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so
109 # Shared libraries need to be marked executable for
110 # rpmbuild to strip them and include them in debuginfo
111 find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} \;
114 rm -rf $RPM_BUILD_ROOT
116 %post -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
119 %post -n python-ldb -p /sbin/ldconfig
120 %postun -n python-ldb -p /sbin/ldconfig
123 %defattr(644,root,root,755)
125 %{_libdir}/libldb.so.*
126 %dir %{_libdir}/ldb/modules
127 %dir %{_libdir}/ldb/modules/ldb
128 %{_libdir}/ldb/modules/ldb/*.so
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_bindir}/ldbadd
133 %attr(755,root,root) %{_bindir}/ldbdel
134 %attr(755,root,root) %{_bindir}/ldbedit
135 %attr(755,root,root) %{_bindir}/ldbmodify
136 %attr(755,root,root) %{_bindir}/ldbrename
137 %attr(755,root,root) %{_bindir}/ldbsearch
138 %{_libdir}/ldb/libldb-cmdline.so
139 %{_mandir}/man1/ldbadd.1.*
140 %{_mandir}/man1/ldbdel.1.*
141 %{_mandir}/man1/ldbedit.1.*
142 %{_mandir}/man1/ldbmodify.1.*
143 %{_mandir}/man1/ldbrename.1.*
144 %{_mandir}/man1/ldbsearch.1.*
147 %defattr(644,root,root,755)
148 %{_includedir}/ldb_module.h
149 %{_includedir}/ldb_handlers.h
150 %{_includedir}/ldb_errors.h
151 %{_includedir}/ldb_version.h
155 %{_pkgconfigdir}/ldb.pc
156 %{_mandir}/man3/ldb.3*
159 %defattr(644,root,root,755)
161 %{_libdir}/libpyldb-util.so.1*
163 %files -n python-ldb-devel
164 %defattr(644,root,root,755)
165 %{_includedir}/pyldb.h
166 %{_libdir}/libpyldb-util.so
167 %{_pkgconfigdir}/pyldb-util.pc