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