3 # - remove fedora macro junk
4 # - remove fedora conditions
6 # - use pld path macros
8 # - tests bcond and move to proper place from %check
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)")}
17 # Filter out private python and php libs. Does not work on EPEL5,
18 # therefor we use it conditionally
20 %filter_provides_in %{python_sitearch}/.*\.so$
21 %filter_provides_in %{php_extdir}/.*\.so$
25 Summary: Kolab XML format collection parser library
31 URL: http://www.kolab.org
32 Source0: http://mirror.kolabsys.com/pub/releases/libkolabxml-0.8.1.tar.gz
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
38 BuildRequires: boost-devel
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
47 BuildRequires: curl-devel
48 BuildRequires: php-devel >= 5.3
49 BuildRequires: python-devel
50 BuildRequires: qt-devel >= 3
52 BuildRequires: uuid-devel
53 BuildRequires: xerces-c-devel
56 # Only valid in kolabsys.com Koji
57 #BuildRequires: xsd-utils
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.
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
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
81 Requires: php-devel >= 5.3
82 Requires: python-devel
83 Requires: qt-devel >= 3
86 Requires: xerces-c-devel
89 # Only valid in kolabsys.com Koji
93 Development headers for the Kolab XML libraries.
95 %package -n php-kolabformat
96 Summary: PHP bindings for libkolabxml
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}
103 Requires: php-api = %{php_apiver}
106 %description -n php-kolabformat
107 The PHP kolabformat package offers a comprehensible PHP library using
108 the bindings provided through libkolabxml.
110 %package -n python-kolabformat
111 Summary: Python bindings for libkolabxml
113 Requires: %{name}%{?_isa} = %{version}-%{release}
115 %description -n python-kolabformat
116 The PyKolab format package offers a comprehensive Python library using
117 the bindings provided through libkolabxml.
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" \
135 -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
136 -DPYTHON_INCLUDE_DIRS=%{python_include} \
138 -DPHP_INSTALL_DIR=%{php_extdir} \
139 -DPYTHON_BINDINGS=ON \
140 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
146 rm -rf $RPM_BUILD_ROOT
148 %{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
151 install -d $RPM_BUILD_ROOT/%{_datadir}/php
152 mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php
154 install -d $RPM_BUILD_ROOT/%{php_inidir}/
155 cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF
156 extension=kolabformat.so
161 # Make sure libkolabxml.so.* is found, otherwise the tests fail
162 export LD_LIBRARY_PATH=$( pwd )/src/
168 php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
169 python src/python/test.py ||:
173 rm -rf $RPM_BUILD_ROOT
175 %post -p /sbin/ldconfig
177 %postun -p /sbin/ldconfig
180 %defattr(644,root,root,755)
181 %doc DEVELOPMENT NEWS README
185 %defattr(644,root,root,755)
186 %{_includedir}/kolabxml
188 %{_libdir}/cmake/Libkolabxml
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
196 %files -n python-kolabformat
197 %defattr(644,root,root,755)
198 %{py_sitedir}/kolabformat.py*
199 %{py_sitedir}/_kolabformat.so
202 * Wed Jul 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-2
204 - New upstream version
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
209 * Wed Jun 27 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-3
210 - Correct dependency on php
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
215 * Mon Jun 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-1
216 - Actual 0.6.0 release
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
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
230 - Drop build requirement for xsd-utils
232 * Sat Jun 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2
233 - Git snapshot release
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
239 * Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3
240 - Snapshot version with attendee delegation support
242 * Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2
243 - Snapshot version with build system changes
245 * Wed May 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3
246 - Fix PHP kolabformat module packaging
248 * Wed May 2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2
251 * Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1
254 * Mon Apr 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1