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