]>
Commit | Line | Data |
---|---|---|
7f41620a | 1 | # TODO |
88ce4cc5 | 2 | # - ld.bfd enforced because gold does not understand '!' in version script (binutils-3:2.21.53.0.1-1) |
2a1bfbb9 ER |
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 | |
7 | Name: libldb | |
8 | Version: 1.1.0 | |
88ce4cc5 | 9 | Release: 2 |
2a1bfbb9 ER |
10 | License: LGPL v3+ |
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 | BuildRequires: autoconf | |
16 | BuildRequires: docbook-style-xsl | |
17 | BuildRequires: libtalloc-devel >= %{talloc_version} | |
18 | BuildRequires: libxslt | |
19 | BuildRequires: popt-devel | |
20 | BuildRequires: python-devel | |
21 | BuildRequires: python-talloc-devel | |
22 | BuildRequires: python-tdb | |
23 | BuildRequires: tdb-devel >= %{tdb_version} | |
24 | BuildRequires: tevent-devel >= %{tevent_version} | |
25 | Requires: libtalloc >= %{talloc_version} | |
26 | Requires: tdb >= %{tdb_version} | |
27 | Requires: tevent >= %{tevent_version} | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | An extensible library that implements an LDAP like API to access | |
32 | remote LDAP servers, or use local tdb databases. | |
33 | ||
34 | %package -n ldb-tools | |
35 | Summary: Tools to manage LDB files | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
38 | ||
39 | %description -n ldb-tools | |
40 | Tools to manage LDB files. | |
41 | ||
42 | %package devel | |
43 | Summary: Developer tools for the LDB library | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | Requires: libtalloc-devel >= %{talloc_version} | |
47 | Requires: pkgconfig | |
48 | Requires: tdb-devel >= %{tdb_version} | |
49 | Requires: tevent-devel >= %{tevent_version} | |
50 | ||
51 | %description devel | |
52 | Header files needed to develop programs that link against the LDB | |
53 | library. | |
54 | ||
55 | %package -n python-ldb | |
56 | Summary: Python bindings for the LDB library | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | Requires: python-tdb = %{tdb_version} | |
60 | Obsoletes: pyldb | |
61 | ||
62 | %description -n python-ldb | |
63 | Python bindings for the LDB library. | |
64 | ||
65 | %package -n python-ldb-devel | |
66 | Summary: Development files for the Python bindings for the LDB library | |
67 | Group: Development/Libraries | |
68 | Requires: pyldb = %{version}-%{release} | |
69 | ||
70 | %description -n python-ldb-devel | |
71 | Development files for the Python bindings for the LDB library | |
72 | ||
73 | %prep | |
74 | %setup -q -n ldb-%{version} | |
75 | ||
76 | %build | |
2a1bfbb9 ER |
77 | CC="%{__cc}" \ |
78 | CFLAGS="%{rpmcflags}" \ | |
88ce4cc5 | 79 | LDFLAGS="%{rpmldflags} -fuse-ld=bfd" \ |
2a1bfbb9 ER |
80 | PYTHONDIR=%{py_sitedir} \ |
81 | ./configure \ | |
82 | --prefix=%{_prefix} \ | |
83 | --libdir=%{_libdir} \ | |
84 | --with-modulesdir=%{_libdir}/ldb/modules \ | |
85 | --with-privatelibdir=%{_libdir}/ldb \ | |
86 | --bundled-libraries=NONE \ | |
87 | --disable-rpath \ | |
88 | --disable-rpath-install | |
89 | ||
90 | %{__make} \ | |
91 | V=1 | |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | %{__make} install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
98 | # Remove _tevent.so (it's managed by python-tevent) | |
99 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so | |
100 | ||
101 | # Shared libraries need to be marked executable for | |
102 | # rpmbuild to strip them and include them in debuginfo | |
88ce4cc5 | 103 | find $RPM_BUILD_ROOT -name "*.so*" -exec chmod -c +x {} ';' |
2a1bfbb9 ER |
104 | |
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %post -p /sbin/ldconfig | |
109 | %postun -p /sbin/ldconfig | |
110 | ||
111 | %post -n python-ldb -p /sbin/ldconfig | |
112 | %postun -n python-ldb -p /sbin/ldconfig | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
116 | %dir %{_libdir}/ldb | |
117 | %{_libdir}/libldb.so.* | |
118 | %dir %{_libdir}/ldb/modules | |
119 | %dir %{_libdir}/ldb/modules/ldb | |
120 | %{_libdir}/ldb/modules/ldb/*.so | |
121 | ||
122 | %files -n ldb-tools | |
123 | %defattr(644,root,root,755) | |
124 | %attr(755,root,root) %{_bindir}/ldbadd | |
125 | %attr(755,root,root) %{_bindir}/ldbdel | |
126 | %attr(755,root,root) %{_bindir}/ldbedit | |
127 | %attr(755,root,root) %{_bindir}/ldbmodify | |
128 | %attr(755,root,root) %{_bindir}/ldbrename | |
129 | %attr(755,root,root) %{_bindir}/ldbsearch | |
130 | %{_libdir}/ldb/libldb-cmdline.so | |
131 | %{_mandir}/man1/ldbadd.1.* | |
132 | %{_mandir}/man1/ldbdel.1.* | |
133 | %{_mandir}/man1/ldbedit.1.* | |
134 | %{_mandir}/man1/ldbmodify.1.* | |
135 | %{_mandir}/man1/ldbrename.1.* | |
136 | %{_mandir}/man1/ldbsearch.1.* | |
137 | ||
138 | %files devel | |
139 | %defattr(644,root,root,755) | |
140 | %{_includedir}/ldb_module.h | |
141 | %{_includedir}/ldb_handlers.h | |
142 | %{_includedir}/ldb_errors.h | |
143 | %{_includedir}/ldb_version.h | |
144 | %{_includedir}/ldb.h | |
145 | %{_libdir}/libldb.so | |
146 | ||
147 | %{_pkgconfigdir}/ldb.pc | |
148 | %{_mandir}/man3/ldb.3* | |
149 | ||
150 | %files -n python-ldb | |
151 | %defattr(644,root,root,755) | |
152 | %{py_sitedir}/ldb.so | |
153 | %{_libdir}/libpyldb-util.so.1* | |
154 | ||
155 | %files -n python-ldb-devel | |
156 | %defattr(644,root,root,755) | |
157 | %{_includedir}/pyldb.h | |
158 | %{_libdir}/libpyldb-util.so | |
159 | %{_pkgconfigdir}/pyldb-util.pc |