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