]> git.pld-linux.org Git - packages/libkolabxml.git/blame - libkolabxml.spec
pld todo
[packages/libkolabxml.git] / libkolabxml.spec
CommitLineData
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
25Summary: Kolab XML format collection parser library
26Name: libkolabxml
0b03fd92 27Version: 0.8.1
f0ba6589
AM
28Release: 0.1
29License: LGPLv3+
30Group: Libraries
31URL: http://www.kolab.org
0b03fd92 32Source0: http://mirror.kolabsys.com/pub/releases/libkolabxml-0.8.1.tar.gz
f0ba6589
AM
33Patch1: %{name}-0.7.0-fix-build-without-fpermissive.patch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35%if 0%{?rhel} < 6 && 0%{?fedora} < 15
36BuildRequires: boost141-devel
37%else
38BuildRequires: boost-devel
39%endif
40BuildRequires: cmake >= 2.6
41BuildRequires: e2fsprogs-devel
42BuildRequires: libstdc++-devel
43%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
44BuildRequires: kdelibs-devel
45BuildRequires: kdepimlibs-devel
46%endif
47BuildRequires: curl-devel
48BuildRequires: php-devel >= 5.3
49BuildRequires: python-devel
50BuildRequires: qt-devel >= 3
51BuildRequires: swig
52BuildRequires: uuid-devel
53BuildRequires: xerces-c-devel
54BuildRequires: xsd
55
56# Only valid in kolabsys.com Koji
57#BuildRequires: xsd-utils
58
59%description
60The libkolabxml parsing library interprets Kolab XML formats (xCal,
61xCard) with bindings for Python, PHP and other languages. The language
62bindings are available through sub-packages.
63
64%package devel
65Summary: Kolab XML library development headers
66Group: Development/Libraries
67Requires: %{name}%{?_isa} = %{version}-%{release}
68%if 0%{?rhel} < 6 && 0%{?fedora} < 15
69Requires: boost141-devel
70%else
71Requires: boost-devel
72%endif
73Requires: cmake >= 2.6
74Requires: e2fsprogs-devel
75Requires: libstdc++-devel
76%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
77Requires: kdelibs-devel
78Requires: kdepimlibs-devel
79%endif
80Requires: curl-devel
81Requires: php-devel >= 5.3
82Requires: python-devel
83Requires: qt-devel >= 3
84Requires: swig
85Requires: uuid-devel
86Requires: xerces-c-devel
87Requires: xsd
88
89# Only valid in kolabsys.com Koji
90#Requires: xsd-utils
91
92%description devel
93Development headers for the Kolab XML libraries.
94
95%package -n php-kolabformat
96Summary: PHP bindings for libkolabxml
97Group: Libraries
98Requires: %{name}%{?_isa} = %{version}-%{release}
99%if 0%{?rhel} > 5 || 0%{?fedora} > 15
100Requires: php(api) = %{php_core_api}
101Requires: php(zend-abi) = %{php_zend_api}
102%else
103Requires: php-api = %{php_apiver}
104%endif
105
106%description -n php-kolabformat
107The PHP kolabformat package offers a comprehensible PHP library using
108the bindings provided through libkolabxml.
109
110%package -n python-kolabformat
111Summary: Python bindings for libkolabxml
112Group: Libraries
113Requires: %{name}%{?_isa} = %{version}-%{release}
114
115%description -n python-kolabformat
116The PyKolab format package offers a comprehensive Python library using
117the bindings provided through libkolabxml.
118
119%prep
120%setup -q
121%patch1 -p1
122
123%build
124rm -rf build
125mkdir -p build
126pushd 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}
143popd
144
145%install
146rm -rf $RPM_BUILD_ROOT
147pushd build
148%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
149popd
150
151install -d $RPM_BUILD_ROOT/%{_datadir}/php
152mv $RPM_BUILD_ROOT/%{php_extdir}/kolabformat.php $RPM_BUILD_ROOT/%{_datadir}/php/kolabformat.php
153
154install -d $RPM_BUILD_ROOT/%{php_inidir}/
155cat >$RPM_BUILD_ROOT/%{php_inidir}/kolabformat.ini <<EOF
156extension=kolabformat.so
157EOF
158
159%check
160pushd build
161# Make sure libkolabxml.so.* is found, otherwise the tests fail
162export LD_LIBRARY_PATH=$( pwd )/src/
163pushd tests
164./bindingstest ||:
165./conversiontest ||:
166./parsingtest ||:
167popd
168php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
169python src/python/test.py ||:
170popd
171
172%clean
173rm -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
This page took 0.136083 seconds and 4 git commands to generate.