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