]>
Commit | Line | Data |
---|---|---|
ec3fe9a6 ER |
1 | # TODO |
2 | # - pldize: | |
3 | # - remove fedora macro junk | |
4 | # - remove fedora conditions | |
5 | # - add missing files | |
6 | # - use pld path macros | |
7 | # - use pld deps | |
8 | # - tests bcond and move to proper place from %check | |
9 | # - file attrs | |
10 | # - drop changelog | |
11 | ||
f0ba6589 AM |
12 | %{!?php_inidir:%global php_inidir %{_sysconfdir}/php.d/} |
13 | %{?el5:%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)} | |
14 | %{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} | |
15 | %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} | |
16 | ||
17 | # Filter out private python and php libs. Does not work on EPEL5, | |
18 | # therefor we use it conditionally | |
19 | %{?filter_setup: | |
20 | %filter_provides_in %{python_sitearch}/.*\.so$ | |
21 | %filter_provides_in %{php_extdir}/.*\.so$ | |
22 | %filter_setup | |
23 | } | |
24 | ||
25 | Summary: Kolab XML format collection parser library | |
26 | Name: libkolabxml | |
0b03fd92 | 27 | Version: 0.8.1 |
f0ba6589 AM |
28 | Release: 0.1 |
29 | License: LGPLv3+ | |
30 | Group: Libraries | |
31 | URL: http://www.kolab.org | |
0b03fd92 | 32 | Source0: http://mirror.kolabsys.com/pub/releases/libkolabxml-0.8.1.tar.gz |
f0ba6589 AM |
33 | Patch1: %{name}-0.7.0-fix-build-without-fpermissive.patch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | %if 0%{?rhel} < 6 && 0%{?fedora} < 15 | |
36 | BuildRequires: boost141-devel | |
37 | %else | |
38 | BuildRequires: boost-devel | |
39 | %endif | |
40 | BuildRequires: cmake >= 2.6 | |
41 | BuildRequires: e2fsprogs-devel | |
42 | BuildRequires: libstdc++-devel | |
43 | %if 0%{?rhel} > 6 || 0%{?fedora} >= 16 | |
44 | BuildRequires: kdelibs-devel | |
45 | BuildRequires: kdepimlibs-devel | |
46 | %endif | |
47 | BuildRequires: curl-devel | |
48 | BuildRequires: php-devel >= 5.3 | |
49 | BuildRequires: python-devel | |
50 | BuildRequires: qt-devel >= 3 | |
51 | BuildRequires: swig | |
52 | BuildRequires: uuid-devel | |
53 | BuildRequires: xerces-c-devel | |
54 | BuildRequires: xsd | |
55 | ||
56 | # Only valid in kolabsys.com Koji | |
57 | #BuildRequires: xsd-utils | |
58 | ||
59 | %description | |
60 | The libkolabxml parsing library interprets Kolab XML formats (xCal, | |
61 | xCard) with bindings for Python, PHP and other languages. The language | |
62 | bindings are available through sub-packages. | |
63 | ||
64 | %package devel | |
65 | Summary: Kolab XML library development headers | |
66 | Group: Development/Libraries | |
67 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
68 | %if 0%{?rhel} < 6 && 0%{?fedora} < 15 | |
69 | Requires: boost141-devel | |
70 | %else | |
71 | Requires: boost-devel | |
72 | %endif | |
73 | Requires: cmake >= 2.6 | |
74 | Requires: e2fsprogs-devel | |
75 | Requires: libstdc++-devel | |
76 | %if 0%{?rhel} > 6 || 0%{?fedora} >= 16 | |
77 | Requires: kdelibs-devel | |
78 | Requires: kdepimlibs-devel | |
79 | %endif | |
80 | Requires: curl-devel | |
81 | Requires: php-devel >= 5.3 | |
82 | Requires: python-devel | |
83 | Requires: qt-devel >= 3 | |
84 | Requires: swig | |
85 | Requires: uuid-devel | |
86 | Requires: xerces-c-devel | |
87 | Requires: xsd | |
88 | ||
89 | # Only valid in kolabsys.com Koji | |
90 | #Requires: xsd-utils | |
91 | ||
92 | %description devel | |
93 | Development headers for the Kolab XML libraries. | |
94 | ||
95 | %package -n php-kolabformat | |
96 | Summary: PHP bindings for libkolabxml | |
97 | Group: Libraries | |
98 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
99 | %if 0%{?rhel} > 5 || 0%{?fedora} > 15 | |
100 | Requires: php(api) = %{php_core_api} | |
101 | Requires: php(zend-abi) = %{php_zend_api} | |
102 | %else | |
103 | Requires: php-api = %{php_apiver} | |
104 | %endif | |
105 | ||
106 | %description -n php-kolabformat | |
107 | The PHP kolabformat package offers a comprehensible PHP library using | |
108 | the bindings provided through libkolabxml. | |
109 | ||
110 | %package -n python-kolabformat | |
111 | Summary: Python bindings for libkolabxml | |
112 | Group: Libraries | |
113 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
114 | ||
115 | %description -n python-kolabformat | |
116 | The PyKolab format package offers a comprehensive Python library using | |
117 | the bindings provided through libkolabxml. | |
118 | ||
119 | %prep | |
120 | %setup -q | |
121 | %patch1 -p1 | |
122 | ||
123 | %build | |
124 | rm -rf build | |
125 | mkdir -p build | |
126 | pushd build | |
127 | %{cmake} -Wno-fatal-errors -Wno-errors \ | |
128 | -DCMAKE_SKIP_RPATH=ON \ | |
129 | -DCMAKE_PREFIX_PATH=%{_libdir} \ | |
130 | %if 0%{?rhel} < 6 && 0%{?fedora} < 15 | |
131 | -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \ | |
132 | -DBOOST_INCLUDEDIR=%{_includedir}/boost141 \ | |
133 | -DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \ | |
134 | %endif | |
135 | -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \ | |
136 | -DPYTHON_INCLUDE_DIRS=%{python_include} \ | |
137 | -DPHP_BINDINGS=ON \ | |
138 | -DPHP_INSTALL_DIR=%{php_extdir} \ | |
139 | -DPYTHON_BINDINGS=ON \ | |
140 | -DPYTHON_INSTALL_DIR=%{py_sitedir} \ | |
141 | .. | |
142 | %{__make} | |
143 | popd | |
144 | ||
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | pushd build | |
148 | %{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' | |
149 | popd | |
150 | ||
151 | install -d $RPM_BUILD_ROOT/%{_datadir}/php | |
152 | mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php | |
153 | ||
154 | install -d $RPM_BUILD_ROOT/%{php_inidir}/ | |
155 | cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF | |
156 | extension=kolabformat.so | |
157 | EOF | |
158 | ||
159 | %check | |
160 | pushd build | |
161 | # Make sure libkolabxml.so.* is found, otherwise the tests fail | |
162 | export LD_LIBRARY_PATH=$( pwd )/src/ | |
163 | pushd tests | |
164 | ./bindingstest ||: | |
165 | ./conversiontest ||: | |
166 | ./parsingtest ||: | |
167 | popd | |
168 | php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||: | |
169 | python src/python/test.py ||: | |
170 | popd | |
171 | ||
172 | %clean | |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
175 | %post -p /sbin/ldconfig | |
176 | ||
177 | %postun -p /sbin/ldconfig | |
178 | ||
179 | %files | |
180 | %defattr(644,root,root,755) | |
181 | %doc DEVELOPMENT NEWS README | |
182 | %{_libdir}/*.so.* | |
183 | ||
184 | %files devel | |
185 | %defattr(644,root,root,755) | |
186 | %{_includedir}/kolabxml | |
187 | %{_libdir}/*.so | |
188 | %{_libdir}/cmake/Libkolabxml | |
189 | ||
190 | %files -n php-kolabformat | |
191 | %defattr(644,root,root,755) | |
192 | %config(noreplace) %{php_inidir}/kolabformat.ini | |
193 | %{php_data_dir}/kolabformat.php | |
194 | %{php_extdir}/kolabformat.so | |
195 | ||
196 | %files -n python-kolabformat | |
197 | %defattr(644,root,root,755) | |
198 | %{py_sitedir}/kolabformat.py* | |
199 | %{py_sitedir}/_kolabformat.so | |
200 | ||
201 | %changelog | |
202 | * Wed Jul 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-2 | |
203 | - Fix build on ppc64 | |
204 | - New upstream version | |
205 | ||
206 | * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4 | |
207 | - Rebuilt for https: //fedoraproject.org/wiki/Fedora_18_Mass_Rebuild | |
208 | ||
209 | * Wed Jun 27 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-3 | |
210 | - Correct dependency on php | |
211 | ||
212 | * Tue Jun 26 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-2 | |
213 | - Also remove xsd-utils requirement for -devel sub-package | |
214 | ||
215 | * Mon Jun 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-1 | |
216 | - Actual 0.6.0 release | |
217 | ||
218 | * Sat Jun 23 2012 Christoph Wickert <wickert@kolabsys.com> - 0.6-1 | |
219 | - Update to 0.6 final | |
220 | - Run ldconfig in %%post and %%postun | |
221 | - Mark kolabformat.ini as config file | |
222 | - Export LD_LIBRARY_PATH so tests can be run in %%check | |
223 | - Add php dependencies to php-kolabformat package | |
224 | - Make base package requirements are arch-specific | |
225 | - Filter unwanted provides of php-kolabformat and python-kolabformat | |
226 | ||
227 | * Wed Jun 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.4 | |
228 | - Some other cleanups to prevent review scrutiny from blocking | |
229 | inclusion | |
230 | - Drop build requirement for xsd-utils | |
231 | ||
232 | * Sat Jun 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2 | |
233 | - Git snapshot release | |
234 | ||
235 | * Wed May 23 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-5 | |
236 | - Correct use of Python keyword None | |
237 | - Snapshot version with attendee cutype support | |
238 | ||
239 | * Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3 | |
240 | - Snapshot version with attendee delegation support | |
241 | ||
242 | * Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2 | |
243 | - Snapshot version with build system changes | |
244 | ||
245 | * Wed May 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3 | |
246 | - Fix PHP kolabformat module packaging | |
247 | ||
248 | * Wed May 2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2 | |
249 | - New version | |
250 | ||
251 | * Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1 | |
252 | - New version | |
253 | ||
254 | * Mon Apr 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1 | |
255 | - First package | |
256 |