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