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