]> git.pld-linux.org Git - packages/libkolabxml.git/blame_incremental - libkolabxml.spec
- release 6 (by relup.sh)
[packages/libkolabxml.git] / libkolabxml.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5Summary: Kolab XML format collection parser library
6Name: libkolabxml
7Version: 0.8.1
8Release: 6
9License: LGPL v3+
10Group: Libraries
11URL: http://www.kolab.org/
12Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
13# Source0-md5: a02541b35153334c69ee1845dfe464c6
14BuildRequires: QtCore-devel
15BuildRequires: boost-devel
16BuildRequires: cmake >= 2.6
17BuildRequires: curl-devel
18BuildRequires: e2fsprogs-devel
19BuildRequires: kde4-kdelibs-devel
20BuildRequires: kde4-kdepimlibs-devel
21BuildRequires: libstdc++-devel
22BuildRequires: libuuid-devel
23BuildRequires: php-devel >= 5.3
24BuildRequires: python-devel
25BuildRequires: qt4-build
26BuildRequires: rpmbuild(macros) >= 1.600
27BuildRequires: swig
28BuildRequires: swig-php
29BuildRequires: xerces-c-devel
30BuildRequires: xsd
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
41Requires: %{name} = %{version}-%{release}
42Requires: QtCore-devel
43Requires: boost-devel
44Requires: cmake >= 2.6
45Requires: curl-devel
46Requires: e2fsprogs-devel
47Requires: kde4-kdelibs-devel
48Requires: kde4-kdepimlibs-devel
49Requires: libstdc++-devel
50Requires: libuuid-devel
51Requires: php-devel >= 5.3
52Requires: python-devel
53Requires: swig
54Requires: xerces-c-devel
55Requires: xsd
56
57%description devel
58Development headers for the Kolab XML libraries.
59
60%package -n php-kolabformat
61Summary: PHP bindings for libkolabxml
62Group: Development/Languages/PHP
63Requires: %{name} = %{version}-%{release}
64%{?requires_php_extension}
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
73Requires: %{name} = %{version}-%{release}
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
81
82%build
83install -d build
84cd build
85%cmake \
86 -Wno-fatal-errors -Wno-errors \
87 -DPHP4_EXECUTABLE=%{_bindir}/php \
88 -DCMAKE_SKIP_RPATH=ON \
89 -DCMAKE_PREFIX_PATH=%{_libdir} \
90 -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
91 -DPYTHON_INCLUDE_DIRS=%{python_include} \
92 -DPHP_BINDINGS=ON \
93 -DPHP_INSTALL_DIR=%{php_extensiondir} \
94 -DPYTHON_BINDINGS=ON \
95 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
96 ..
97%{__make}
98cd ..
99
100%if %{with tests}
101cd build
102# Make sure libkolabxml.so.* is found, otherwise the tests fail
103export LD_LIBRARY_PATH=$(pwd)/src
104cd tests
105./bindingstest ||:
106./conversiontest ||:
107./parsingtest ||:
108cd ..
109php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
110%{__python} src/python/test.py ||:
111%endif
112
113%install
114rm -rf $RPM_BUILD_ROOT
115%{__make} -C build install \
116 INSTALL='install -p' \
117 DESTDIR=$RPM_BUILD_ROOT
118
119install -d $RPM_BUILD_ROOT%{php_data_dir}
120mv $RPM_BUILD_ROOT%{php_extensiondir}/kolabformat.php $RPM_BUILD_ROOT%{php_data_dir}/kolabformat.php
121
122install -d $RPM_BUILD_ROOT%{php_sysconfdir}
123cat > $RPM_BUILD_ROOT%{php_sysconfdir}/kolabformat.ini <<EOF
124; Enable kolabformat extension module
125extension=kolabformat.so
126EOF
127
128%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
129%py_comp $RPM_BUILD_ROOT%{py_sitedir}
130%py_postclean
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%post -p /sbin/ldconfig
136%postun -p /sbin/ldconfig
137
138%files
139%defattr(644,root,root,755)
140%doc DEVELOPMENT NEWS README
141%attr(755,root,root) %{_libdir}/libkolabxml.so.*.*
142%attr(755,root,root) %ghost %{_libdir}/libkolabxml.so.0
143
144%files devel
145%defattr(644,root,root,755)
146%{_includedir}/kolabxml
147%{_libdir}/*.so
148%{_libdir}/cmake/Libkolabxml
149
150%files -n php-kolabformat
151%defattr(644,root,root,755)
152%config(noreplace) %{php_sysconfdir}/kolabformat.ini
153%attr(755,root,root) %{php_extensiondir}/kolabformat.so
154%{php_data_dir}/kolabformat.php
155
156%files -n python-kolabformat
157%defattr(644,root,root,755)
158%attr(755,root,root) %{py_sitedir}/_kolabformat.so
159%{py_sitedir}/kolabformat.py[co]
This page took 0.027575 seconds and 4 git commands to generate.