]> git.pld-linux.org Git - packages/libkolabxml.git/blame - libkolabxml.spec
- almost raw
[packages/libkolabxml.git] / libkolabxml.spec
CommitLineData
f0ba6589
AM
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)")}
5
6# Filter out private python and php libs. Does not work on EPEL5,
7# therefor we use it conditionally
8%{?filter_setup:
9%filter_provides_in %{python_sitearch}/.*\.so$
10%filter_provides_in %{php_extdir}/.*\.so$
11%filter_setup
12}
13
14Summary: Kolab XML format collection parser library
15Name: libkolabxml
16Version: 0.7.0
17Release: 0.1
18License: LGPLv3+
19Group: Libraries
20URL: http://www.kolab.org
21Source0: http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
22Patch1: %{name}-0.7.0-fix-build-without-fpermissive.patch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24%if 0%{?rhel} < 6 && 0%{?fedora} < 15
25BuildRequires: boost141-devel
26%else
27BuildRequires: boost-devel
28%endif
29BuildRequires: cmake >= 2.6
30BuildRequires: e2fsprogs-devel
31BuildRequires: libstdc++-devel
32%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
33BuildRequires: kdelibs-devel
34BuildRequires: kdepimlibs-devel
35%endif
36BuildRequires: curl-devel
37BuildRequires: php-devel >= 5.3
38BuildRequires: python-devel
39BuildRequires: qt-devel >= 3
40BuildRequires: swig
41BuildRequires: uuid-devel
42BuildRequires: xerces-c-devel
43BuildRequires: xsd
44
45# Only valid in kolabsys.com Koji
46#BuildRequires: xsd-utils
47
48%description
49The libkolabxml parsing library interprets Kolab XML formats (xCal,
50xCard) with bindings for Python, PHP and other languages. The language
51bindings are available through sub-packages.
52
53%package devel
54Summary: Kolab XML library development headers
55Group: Development/Libraries
56Requires: %{name}%{?_isa} = %{version}-%{release}
57%if 0%{?rhel} < 6 && 0%{?fedora} < 15
58Requires: boost141-devel
59%else
60Requires: boost-devel
61%endif
62Requires: cmake >= 2.6
63Requires: e2fsprogs-devel
64Requires: libstdc++-devel
65%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
66Requires: kdelibs-devel
67Requires: kdepimlibs-devel
68%endif
69Requires: curl-devel
70Requires: php-devel >= 5.3
71Requires: python-devel
72Requires: qt-devel >= 3
73Requires: swig
74Requires: uuid-devel
75Requires: xerces-c-devel
76Requires: xsd
77
78# Only valid in kolabsys.com Koji
79#Requires: xsd-utils
80
81%description devel
82Development headers for the Kolab XML libraries.
83
84%package -n php-kolabformat
85Summary: PHP bindings for libkolabxml
86Group: Libraries
87Requires: %{name}%{?_isa} = %{version}-%{release}
88%if 0%{?rhel} > 5 || 0%{?fedora} > 15
89Requires: php(api) = %{php_core_api}
90Requires: php(zend-abi) = %{php_zend_api}
91%else
92Requires: php-api = %{php_apiver}
93%endif
94
95%description -n php-kolabformat
96The PHP kolabformat package offers a comprehensible PHP library using
97the bindings provided through libkolabxml.
98
99%package -n python-kolabformat
100Summary: Python bindings for libkolabxml
101Group: Libraries
102Requires: %{name}%{?_isa} = %{version}-%{release}
103
104%description -n python-kolabformat
105The PyKolab format package offers a comprehensive Python library using
106the bindings provided through libkolabxml.
107
108%prep
109%setup -q
110%patch1 -p1
111
112%build
113rm -rf build
114mkdir -p build
115pushd build
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" \
123%endif
124 -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
125 -DPYTHON_INCLUDE_DIRS=%{python_include} \
126 -DPHP_BINDINGS=ON \
127 -DPHP_INSTALL_DIR=%{php_extdir} \
128 -DPYTHON_BINDINGS=ON \
129 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
130 ..
131%{__make}
132popd
133
134%install
135rm -rf $RPM_BUILD_ROOT
136pushd build
137%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
138popd
139
140install -d $RPM_BUILD_ROOT/%{_datadir}/php
141mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php
142
143install -d $RPM_BUILD_ROOT/%{php_inidir}/
144cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF
145extension=kolabformat.so
146EOF
147
148%check
149pushd build
150# Make sure libkolabxml.so.* is found, otherwise the tests fail
151export LD_LIBRARY_PATH=$( pwd )/src/
152pushd tests
153./bindingstest ||:
154./conversiontest ||:
155./parsingtest ||:
156popd
157php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
158python src/python/test.py ||:
159popd
160
161%clean
162rm -rf $RPM_BUILD_ROOT
163
164%post -p /sbin/ldconfig
165
166%postun -p /sbin/ldconfig
167
168%files
169%defattr(644,root,root,755)
170%doc DEVELOPMENT NEWS README
171%{_libdir}/*.so.*
172
173%files devel
174%defattr(644,root,root,755)
175%{_includedir}/kolabxml
176%{_libdir}/*.so
177%{_libdir}/cmake/Libkolabxml
178
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
184
185%files -n python-kolabformat
186%defattr(644,root,root,755)
187%{py_sitedir}/kolabformat.py*
188%{py_sitedir}/_kolabformat.so
189
190%changelog
191* Wed Jul 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-2
192- Fix build on ppc64
193- New upstream version
194
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
197
198* Wed Jun 27 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-3
199- Correct dependency on php
200
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
203
204* Mon Jun 25 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6.0-1
205- Actual 0.6.0 release
206
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
215
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
218 inclusion
219- Drop build requirement for xsd-utils
220
221* Sat Jun 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.6-0.2
222- Git snapshot release
223
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
227
228* Tue May 22 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-3
229- Snapshot version with attendee delegation support
230
231* Sat May 12 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.5-2
232- Snapshot version with build system changes
233
234* Wed May 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-3
235- Fix PHP kolabformat module packaging
236
237* Wed May 2 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-2
238- New version
239
240* Fri Apr 20 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3.0-1
241- New version
242
243* Mon Apr 9 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.3-0.1
244- First package
245
This page took 0.162091 seconds and 4 git commands to generate.