]> git.pld-linux.org Git - packages/ldb.git/blob - ldb.spec
- try to force ld.bfd in PATH/COMPILER_PATH. still gcc internally uses /usr/bin/ld :(
[packages/ldb.git] / ldb.spec
1 # TODO
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
7 Name:           libldb
8 Version:        1.1.0
9 Release:        1
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 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)
30
31 %description
32 An extensible library that implements an LDAP like API to access
33 remote LDAP servers, or use local tdb databases.
34
35 %package -n ldb-tools
36 Summary:        Tools to manage LDB files
37 Group:          Development/Libraries
38 Requires:       %{name} = %{version}-%{release}
39
40 %description -n ldb-tools
41 Tools to manage LDB files.
42
43 %package devel
44 Summary:        Developer tools for the LDB library
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       libtalloc-devel >= %{talloc_version}
48 Requires:       pkgconfig
49 Requires:       tdb-devel >= %{tdb_version}
50 Requires:       tevent-devel >= %{tevent_version}
51
52 %description devel
53 Header files needed to develop programs that link against the LDB
54 library.
55
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}
61 Obsoletes:      pyldb
62
63 %description -n python-ldb
64 Python bindings for the LDB library.
65
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}
70
71 %description -n python-ldb-devel
72 Development files for the Python bindings for the LDB library
73
74 %prep
75 %setup -q -n ldb-%{version}
76 %patch0 -p1
77
78 %build
79 # use ld.bfd
80 install -d $(pwd)/ld-bin
81 ln -s %{_bindir}/ld.bfd $(pwd)/ld-bin/ld
82
83 # note: configure in fact is waf call
84 PATH=$(pwd)/ld-bin:$PATH \
85 COMPILER_PATH=$(pwd)/ld-bin \
86 CC="%{__cc}" \
87 CFLAGS="%{rpmcflags}" \
88 PYTHONDIR=%{py_sitedir} \
89 ./configure \
90         --prefix=%{_prefix} \
91         --libdir=%{_libdir} \
92         --with-modulesdir=%{_libdir}/ldb/modules \
93         --with-privatelibdir=%{_libdir}/ldb \
94         --bundled-libraries=NONE \
95         --disable-rpath \
96         --disable-rpath-install
97
98 %{__make} \
99         V=1
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 # Remove _tevent.so (it's managed by python-tevent)
107 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_tevent.so
108
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 {} \;
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post   -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
118
119 %post   -n python-ldb -p /sbin/ldconfig
120 %postun -n python-ldb -p /sbin/ldconfig
121
122 %files
123 %defattr(644,root,root,755)
124 %dir %{_libdir}/ldb
125 %{_libdir}/libldb.so.*
126 %dir %{_libdir}/ldb/modules
127 %dir %{_libdir}/ldb/modules/ldb
128 %{_libdir}/ldb/modules/ldb/*.so
129
130 %files -n ldb-tools
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.*
145
146 %files devel
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
152 %{_includedir}/ldb.h
153 %{_libdir}/libldb.so
154
155 %{_pkgconfigdir}/ldb.pc
156 %{_mandir}/man3/ldb.3*
157
158 %files -n python-ldb
159 %defattr(644,root,root,755)
160 %{py_sitedir}/ldb.so
161 %{_libdir}/libpyldb-util.so.1*
162
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
This page took 0.052453 seconds and 4 git commands to generate.