1 %{!?php_inidir:%global php_inidir %{_sysconfdir}/php.d/}
2 %{?el5:%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)}
3 %{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4 %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
6 # Filter out private python and php libs. Does not work on EPEL5,
7 # therefor we use it conditionally
9 %filter_provides_in %{python_sitearch}/.*\.so$
10 %filter_provides_in %{php_extdir}/.*\.so$
14 Summary: Kolab XML format collection parser library
20 URL: http://www.kolab.org
21 Source0: http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
22 Patch1: %{name}-0.7.0-fix-build-without-fpermissive.patch
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
25 BuildRequires: boost141-devel
27 BuildRequires: boost-devel
29 BuildRequires: cmake >= 2.6
30 BuildRequires: e2fsprogs-devel
31 BuildRequires: libstdc++-devel
32 %if 0%{?rhel} > 6 || 0%{?fedora} >= 16
33 BuildRequires: kdelibs-devel
34 BuildRequires: kdepimlibs-devel
36 BuildRequires: curl-devel
37 BuildRequires: php-devel >= 5.3
38 BuildRequires: python-devel
39 BuildRequires: qt-devel >= 3
41 BuildRequires: uuid-devel
42 BuildRequires: xerces-c-devel
45 # Only valid in kolabsys.com Koji
46 #BuildRequires: xsd-utils
49 The libkolabxml parsing library interprets Kolab XML formats (xCal,
50 xCard) with bindings for Python, PHP and other languages. The language
51 bindings are available through sub-packages.
54 Summary: Kolab XML library development headers
55 Group: Development/Libraries
56 Requires: %{name}%{?_isa} = %{version}-%{release}
57 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
58 Requires: boost141-devel
62 Requires: cmake >= 2.6
63 Requires: e2fsprogs-devel
64 Requires: libstdc++-devel
65 %if 0%{?rhel} > 6 || 0%{?fedora} >= 16
66 Requires: kdelibs-devel
67 Requires: kdepimlibs-devel
70 Requires: php-devel >= 5.3
71 Requires: python-devel
72 Requires: qt-devel >= 3
75 Requires: xerces-c-devel
78 # Only valid in kolabsys.com Koji
82 Development headers for the Kolab XML libraries.
84 %package -n php-kolabformat
85 Summary: PHP bindings for libkolabxml
87 Requires: %{name}%{?_isa} = %{version}-%{release}
88 %if 0%{?rhel} > 5 || 0%{?fedora} > 15
89 Requires: php(api) = %{php_core_api}
90 Requires: php(zend-abi) = %{php_zend_api}
92 Requires: php-api = %{php_apiver}
95 %description -n php-kolabformat
96 The PHP kolabformat package offers a comprehensible PHP library using
97 the bindings provided through libkolabxml.
99 %package -n python-kolabformat
100 Summary: Python bindings for libkolabxml
102 Requires: %{name}%{?_isa} = %{version}-%{release}
104 %description -n python-kolabformat
105 The PyKolab format package offers a comprehensive Python library using
106 the bindings provided through libkolabxml.
116 %{cmake} -Wno-fatal-errors -Wno-errors \
117 -DCMAKE_SKIP_RPATH=ON \
118 -DCMAKE_PREFIX_PATH=%{_libdir} \
119 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
120 -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
121 -DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
122 -DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \
124 -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
125 -DPYTHON_INCLUDE_DIRS=%{python_include} \
127 -DPHP_INSTALL_DIR=%{php_extdir} \
128 -DPYTHON_BINDINGS=ON \
129 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
135 rm -rf $RPM_BUILD_ROOT
137 %{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
140 install -d $RPM_BUILD_ROOT/%{_datadir}/php
141 mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php
143 install -d $RPM_BUILD_ROOT/%{php_inidir}/
144 cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF
145 extension=kolabformat.so
150 # Make sure libkolabxml.so.* is found, otherwise the tests fail
151 export LD_LIBRARY_PATH=$( pwd )/src/
157 php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
158 python src/python/test.py ||:
162 rm -rf $RPM_BUILD_ROOT
164 %post -p /sbin/ldconfig
166 %postun -p /sbin/ldconfig
169 %defattr(644,root,root,755)
170 %doc DEVELOPMENT NEWS README
174 %defattr(644,root,root,755)
175 %{_includedir}/kolabxml
177 %{_libdir}/cmake/Libkolabxml
179 %files -n php-kolabformat
180 %defattr(644,root,root,755)
181 %config(noreplace) %{php_inidir}/kolabformat.ini
182 %{php_data_dir}/kolabformat.php
183 %{php_extdir}/kolabformat.so
185 %files -n python-kolabformat
186 %defattr(644,root,root,755)
187 %{py_sitedir}/kolabformat.py*
188 %{py_sitedir}/_kolabformat.so
191 * Wed Jul 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-2
193 - New upstream version
195 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4
196 - Rebuilt for https: //fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
198 * Wed Jun 27 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-3
199 - Correct dependency on php
201 * Tue Jun 26 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-2
202 - Also remove xsd-utils requirement for -devel sub-package
204 * Mon Jun 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-1
205 - Actual 0.6.0 release
207 * Sat Jun 23 2012 Christoph Wickert <wickert@kolabsys.com> - 0.6-1
208 - Update to 0.6 final
209 - Run ldconfig in %%post and %%postun
210 - Mark kolabformat.ini as config file
211 - Export LD_LIBRARY_PATH so tests can be run in %%check
212 - Add php dependencies to php-kolabformat package
213 - Make base package requirements are arch-specific
214 - Filter unwanted provides of php-kolabformat and python-kolabformat
216 * Wed Jun 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.4
217 - Some other cleanups to prevent review scrutiny from blocking
219 - Drop build requirement for xsd-utils
221 * Sat Jun 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2
222 - Git snapshot release
224 * Wed May 23 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-5
225 - Correct use of Python keyword None
226 - Snapshot version with attendee cutype support
228 * Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3
229 - Snapshot version with attendee delegation support
231 * Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2
232 - Snapshot version with build system changes
234 * Wed May 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3
235 - Fix PHP kolabformat module packaging
237 * Wed May 2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2
240 * Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1
243 * Mon Apr 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1