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