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