]> git.pld-linux.org Git - packages/libkolabxml.git/blame - libkolabxml.spec
- release 9 (by relup.sh)
[packages/libkolabxml.git] / libkolabxml.spec
CommitLineData
390184bb
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
a20b2092 4%bcond_with php # PHP bindings
c866a2f0
ER
5%bcond_without python # Python bindings
6
d2b82142 7%define php_name php55
f0ba6589
AM
8Summary: Kolab XML format collection parser library
9Name: libkolabxml
9b3fc279 10Version: 1.1.6
eeb728d6 11Release: 9
390184bb 12License: LGPL v3+
f0ba6589 13Group: Libraries
7d487fd2 14Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
9b3fc279 15# Source0-md5: eec4b8bf117a6e263eed9ee800ae3aa6
c866a2f0 16URL: http://www.kolab.org/
7d487fd2 17BuildRequires: QtCore-devel
f0ba6589 18BuildRequires: boost-devel
f0ba6589 19BuildRequires: cmake >= 2.6
7d487fd2 20BuildRequires: curl-devel
f0ba6589
AM
21BuildRequires: e2fsprogs-devel
22BuildRequires: libstdc++-devel
7d487fd2 23BuildRequires: libuuid-devel
7d487fd2 24BuildRequires: qt4-build
390184bb 25BuildRequires: rpmbuild(macros) >= 1.600
f0ba6589 26BuildRequires: swig
f0ba6589
AM
27BuildRequires: xerces-c-devel
28BuildRequires: xsd
c866a2f0
ER
29%if %{with python}
30BuildRequires: python-devel
31BuildRequires: swig-python
32%endif
33%if %{with php}
2b9dc121 34BuildRequires: %{php_name}-cli
46352b52
WF
35%if %{with tests}
36BuildRequires: %{php_name}-pcre
37%endif
bfe7ce4e 38BuildRequires: %{php_name}-program
c866a2f0
ER
39BuildRequires: %{php_name}-devel
40BuildRequires: swig-php
41%endif
7d487fd2 42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
f0ba6589
AM
43
44%description
45The libkolabxml parsing library interprets Kolab XML formats (xCal,
46xCard) with bindings for Python, PHP and other languages. The language
47bindings are available through sub-packages.
48
49%package devel
50Summary: Kolab XML library development headers
51Group: Development/Libraries
7d487fd2
AM
52Requires: %{name} = %{version}-%{release}
53Requires: QtCore-devel
f0ba6589 54Requires: boost-devel
f0ba6589 55Requires: cmake >= 2.6
7d487fd2 56Requires: curl-devel
f0ba6589
AM
57Requires: e2fsprogs-devel
58Requires: libstdc++-devel
7d487fd2 59Requires: libuuid-devel
f0ba6589 60Requires: swig
f0ba6589
AM
61Requires: xerces-c-devel
62Requires: xsd
63
f0ba6589
AM
64%description devel
65Development headers for the Kolab XML libraries.
66
82ea52bf 67%package -n %{php_name}-kolabformat
f0ba6589 68Summary: PHP bindings for libkolabxml
390184bb 69Group: Development/Languages/PHP
7d487fd2
AM
70Requires: %{name} = %{version}-%{release}
71%{?requires_php_extension}
f0ba6589 72
82ea52bf 73%description -n %{php_name}-kolabformat
f0ba6589
AM
74The PHP kolabformat package offers a comprehensible PHP library using
75the bindings provided through libkolabxml.
76
77%package -n python-kolabformat
78Summary: Python bindings for libkolabxml
79Group: Libraries
7d487fd2 80Requires: %{name} = %{version}-%{release}
f0ba6589
AM
81
82%description -n python-kolabformat
83The PyKolab format package offers a comprehensive Python library using
84the bindings provided through libkolabxml.
85
86%prep
87%setup -q
f0ba6589
AM
88
89%build
7d487fd2
AM
90install -d build
91cd build
390184bb
ER
92%cmake \
93 -Wno-fatal-errors -Wno-errors \
f0ba6589
AM
94 -DCMAKE_SKIP_RPATH=ON \
95 -DCMAKE_PREFIX_PATH=%{_libdir} \
f0ba6589 96 -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
d8bd1264 97 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
c866a2f0 98%if %{with php}
2b9dc121 99 -DPHP_EXECUTABLE=%{__php} \
f0ba6589 100 -DPHP_BINDINGS=ON \
7d487fd2 101 -DPHP_INSTALL_DIR=%{php_extensiondir} \
c866a2f0
ER
102%endif
103%if %{with python}
f0ba6589 104 -DPYTHON_BINDINGS=ON \
c866a2f0 105 -DPYTHON_INCLUDE_DIRS=%{python_include} \
f0ba6589 106 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
c866a2f0 107%endif
f0ba6589
AM
108 ..
109%{__make}
7d487fd2 110cd ..
f0ba6589 111
7d487fd2
AM
112%if %{with tests}
113cd build
f0ba6589 114# Make sure libkolabxml.so.* is found, otherwise the tests fail
390184bb 115export LD_LIBRARY_PATH=$(pwd)/src
7d487fd2 116cd tests
82ea52bf
AM
117./bindingstest
118./conversiontest
119./parsingtest
c866a2f0
ER
120cd ..
121%if %{with php}
122cd src/php
82ea52bf 123php -d 'enable_dl=On' '-dextension=../../src/php/kolabformat.so' test.php
9b3fc279 124cd ../..
c866a2f0
ER
125%endif
126%if %{with python}
9b3fc279 127cd src/python
82ea52bf
AM
128# FIXME
129%{__python} test.py ||
9b3fc279 130cd ../..
c866a2f0 131%endif
7d487fd2
AM
132%endif
133
134%install
135rm -rf $RPM_BUILD_ROOT
7d487fd2 136%{__make} -C build install \
390184bb
ER
137 INSTALL='install -p' \
138 DESTDIR=$RPM_BUILD_ROOT
7d487fd2 139
c866a2f0
ER
140%if %{with php}
141install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_data_dir}}
390184bb 142mv $RPM_BUILD_ROOT%{php_extensiondir}/kolabformat.php $RPM_BUILD_ROOT%{php_data_dir}/kolabformat.php
c866a2f0 143cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/kolabformat.ini <<EOF
05d503b6 144; Enable kolabformat extension module
7d487fd2
AM
145extension=kolabformat.so
146EOF
c866a2f0 147%endif
f0ba6589 148
c866a2f0 149%if %{with python}
05d503b6
ER
150%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
151%py_comp $RPM_BUILD_ROOT%{py_sitedir}
152%py_postclean
c866a2f0 153%endif
05d503b6 154
f0ba6589
AM
155%clean
156rm -rf $RPM_BUILD_ROOT
157
05d503b6
ER
158%post -p /sbin/ldconfig
159%postun -p /sbin/ldconfig
f0ba6589
AM
160
161%files
162%defattr(644,root,root,755)
163%doc DEVELOPMENT NEWS README
7d487fd2 164%attr(755,root,root) %{_libdir}/libkolabxml.so.*.*
37d8e7e0 165%attr(755,root,root) %ghost %{_libdir}/libkolabxml.so.1
f0ba6589
AM
166
167%files devel
168%defattr(644,root,root,755)
169%{_includedir}/kolabxml
c866a2f0 170%{_libdir}/libkolabxml.so
f0ba6589
AM
171%{_libdir}/cmake/Libkolabxml
172
c866a2f0 173%if %{with php}
82ea52bf 174%files -n %{php_name}-kolabformat
f0ba6589 175%defattr(644,root,root,755)
c866a2f0 176%config(noreplace) %{php_sysconfdir}/conf.d/kolabformat.ini
05d503b6 177%attr(755,root,root) %{php_extensiondir}/kolabformat.so
390184bb 178%{php_data_dir}/kolabformat.php
c866a2f0 179%endif
f0ba6589 180
c866a2f0 181%if %{with python}
f0ba6589
AM
182%files -n python-kolabformat
183%defattr(644,root,root,755)
05d503b6 184%attr(755,root,root) %{py_sitedir}/_kolabformat.so
390184bb 185%{py_sitedir}/kolabformat.py[co]
c866a2f0 186%endif
This page took 0.129149 seconds and 4 git commands to generate.