]>
Commit | Line | Data |
---|---|---|
e431bf77 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
7e633058 AM |
5 | Summary: Kolab Object Handling Library |
6 | Name: libkolab | |
96842dd9 | 7 | Version: 0.3.1 |
039e7839 | 8 | Release: 1 |
6b014dfe | 9 | License: LGPL v3+ |
96842dd9 | 10 | Group: Libraries |
7e633058 | 11 | URL: http://git.kolab.org/libkolab |
96842dd9 AM |
12 | Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz |
13 | # Source0-md5: 99f2b2c519c3ebaa57f8f520e8880e9a | |
039e7839 AM |
14 | Patch0: 0001-Fix-kolab-errorhandler.h-kolabformat-errorhandler.h.patch |
15 | BuildRequires: QtCore-devel | |
7e633058 | 16 | BuildRequires: curl-devel |
6b014dfe | 17 | BuildRequires: kde4-kdepimlibs-devel >= 4.8 |
039e7839 | 18 | BuildRequires: libkolabxml-devel >= 0.8 |
badad8dd | 19 | BuildRequires: php-devel >= 4:5.0.4 |
7e633058 | 20 | BuildRequires: python-devel |
039e7839 | 21 | BuildRequires: qt4-build |
e431bf77 | 22 | BuildRequires: rpmbuild(macros) >= 1.600 |
039e7839 AM |
23 | BuildRequires: swig |
24 | BuildRequires: swig-php | |
6b014dfe | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
7e633058 AM |
26 | |
27 | %description | |
28 | The libkolab library is an advanced library to handle Kolab objects. | |
29 | ||
30 | %package devel | |
31 | Summary: Kolab library development headers | |
e431bf77 | 32 | Group: Development/Languages/PHP |
7e633058 | 33 | Requires: %{name} = %{version}-%{release} |
039e7839 | 34 | Requires: libkolabxml-devel >= 0.8 |
7e633058 AM |
35 | Requires: php-devel |
36 | Requires: pkgconfig | |
37 | Requires: python-devel | |
38 | ||
39 | %description devel | |
40 | Development headers for the Kolab object libraries. | |
41 | ||
42 | %package -n php-kolab | |
43 | Summary: PHP Bindings for libkolab | |
44 | Group: Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
badad8dd | 46 | %{?requires_php_extension} |
7e633058 AM |
47 | |
48 | %description -n php-kolab | |
badad8dd | 49 | PHP Bindings for libkolab. |
7e633058 AM |
50 | |
51 | %package -n python-kolab | |
52 | Summary: Python bindings for libkolab | |
53 | Group: Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description -n python-kolab | |
badad8dd | 57 | Python bindings for libkolab. |
7e633058 AM |
58 | |
59 | %prep | |
60 | %setup -q | |
039e7839 | 61 | %patch0 -p1 |
7e633058 AM |
62 | |
63 | %build | |
64 | rm -rf build | |
6b014dfe ER |
65 | install -d build |
66 | cd build | |
67 | %cmake \ | |
68 | -Wno-fatal-errors -Wno-errors \ | |
7e633058 | 69 | -DINCLUDE_INSTALL_DIR=%{_includedir} \ |
7e633058 | 70 | -DPHP_BINDINGS=ON \ |
badad8dd | 71 | -DPHP_INSTALL_DIR=%{php_extensiondir} \ |
7e633058 AM |
72 | -DPYTHON_BINDINGS=ON \ |
73 | -DPYTHON_INSTALL_DIR=%{py_sitedir} \ | |
74 | .. | |
75 | %{__make} | |
6b014dfe | 76 | cd - |
7e633058 | 77 | |
039e7839 AM |
78 | %if %{with tests} |
79 | cd build/tests | |
7e633058 AM |
80 | ./benchmarktest || : |
81 | ./calendaringtest || : | |
82 | ./formattest || : | |
83 | ./freebusytest || : | |
84 | ./icalendartest || : | |
85 | ./kcalconversiontest || : | |
86 | ./upgradetest || : | |
039e7839 AM |
87 | %endif |
88 | ||
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
039e7839 AM |
91 | %{__make} -C build install \ |
92 | DESTDIR=$RPM_BUILD_ROOT | |
93 | ||
94 | install -d $RPM_BUILD_ROOT%{php_data_dir} | |
95 | mv $RPM_BUILD_ROOT{%{php_extensiondir}/*.php,%{php_data_dir}} | |
7e633058 AM |
96 | |
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
6b014dfe ER |
100 | %post -p /sbin/ldconfig |
101 | %postun -p /sbin/ldconfig | |
7e633058 AM |
102 | |
103 | %files | |
104 | %defattr(644,root,root,755) | |
039e7839 | 105 | %attr(755,root,root) %{_libdir}/%{name}.so.*.* |
e431bf77 | 106 | %attr(755,root,root) %ghost %{_libdir}/%{name}.so.0 |
7e633058 AM |
107 | |
108 | %files devel | |
109 | %defattr(644,root,root,755) | |
039e7839 | 110 | %attr(755,root,root) %{_libdir}/%{name}.so |
7e633058 AM |
111 | %{_libdir}/cmake/Libkolab |
112 | %{_includedir}/kolab | |
113 | ||
114 | %files -n php-kolab | |
115 | %defattr(644,root,root,755) | |
039e7839 AM |
116 | %attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so |
117 | %attr(755,root,root) %{php_extensiondir}/kolabicalendar.so | |
118 | %attr(755,root,root) %{php_extensiondir}/kolabshared.so | |
e431bf77 ER |
119 | %{php_data_dir}/kolabcalendaring.php |
120 | %{php_data_dir}/kolabicalendar.php | |
121 | %{php_data_dir}/kolabshared.php | |
7e633058 AM |
122 | |
123 | %files -n python-kolab | |
124 | %defattr(644,root,root,755) | |
039e7839 AM |
125 | %dir %{py_sitedir}/kolab |
126 | %attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so | |
e431bf77 | 127 | %{py_sitedir}/kolab/calendaring.py[co] |
039e7839 | 128 | %attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so |
e431bf77 | 129 | %{py_sitedir}/kolab/icalendar.py[co] |
039e7839 | 130 | %attr(755,root,root) %{py_sitedir}/kolab/_shared.so |
e431bf77 | 131 | %{py_sitedir}/kolab/shared.py[co] |