]>
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 | |
fdb8064d | 7 | Version: 0.5.0 |
039e7839 | 8 | Release: 1 |
6b014dfe | 9 | License: LGPL v3+ |
96842dd9 | 10 | Group: Libraries |
7e633058 | 11 | URL: http://git.kolab.org/libkolab |
96842dd9 | 12 | Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz |
fdb8064d | 13 | # Source0-md5: 38da4b0918e8585ab935ae02bc321aa0 |
039e7839 | 14 | BuildRequires: QtCore-devel |
7e633058 | 15 | BuildRequires: curl-devel |
6b014dfe | 16 | BuildRequires: kde4-kdepimlibs-devel >= 4.8 |
fdb8064d | 17 | BuildRequires: libkolabxml-devel >= 1.0 |
badad8dd | 18 | BuildRequires: php-devel >= 4:5.0.4 |
7e633058 | 19 | BuildRequires: python-devel |
039e7839 | 20 | BuildRequires: qt4-build |
e431bf77 | 21 | BuildRequires: rpmbuild(macros) >= 1.600 |
039e7839 AM |
22 | BuildRequires: swig |
23 | BuildRequires: swig-php | |
fdb8064d | 24 | BuildRequires: swig-python |
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} |
fdb8064d | 34 | Requires: libkolabxml-devel >= 1.0 |
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 | |
61 | ||
62 | %build | |
63 | rm -rf build | |
6b014dfe ER |
64 | install -d build |
65 | cd build | |
66 | %cmake \ | |
67 | -Wno-fatal-errors -Wno-errors \ | |
fdb8064d | 68 | -DPHP_EXECUTABLE=%{_bindir}/php \ |
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 | 96 | |
0673c669 ER |
97 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
98 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
99 | %py_postclean | |
100 | ||
7e633058 AM |
101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
6b014dfe ER |
104 | %post -p /sbin/ldconfig |
105 | %postun -p /sbin/ldconfig | |
7e633058 AM |
106 | |
107 | %files | |
108 | %defattr(644,root,root,755) | |
039e7839 | 109 | %attr(755,root,root) %{_libdir}/%{name}.so.*.* |
e431bf77 | 110 | %attr(755,root,root) %ghost %{_libdir}/%{name}.so.0 |
7e633058 AM |
111 | |
112 | %files devel | |
113 | %defattr(644,root,root,755) | |
039e7839 | 114 | %attr(755,root,root) %{_libdir}/%{name}.so |
7e633058 AM |
115 | %{_libdir}/cmake/Libkolab |
116 | %{_includedir}/kolab | |
117 | ||
118 | %files -n php-kolab | |
119 | %defattr(644,root,root,755) | |
039e7839 AM |
120 | %attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so |
121 | %attr(755,root,root) %{php_extensiondir}/kolabicalendar.so | |
122 | %attr(755,root,root) %{php_extensiondir}/kolabshared.so | |
e431bf77 ER |
123 | %{php_data_dir}/kolabcalendaring.php |
124 | %{php_data_dir}/kolabicalendar.php | |
125 | %{php_data_dir}/kolabshared.php | |
7e633058 AM |
126 | |
127 | %files -n python-kolab | |
128 | %defattr(644,root,root,755) | |
039e7839 AM |
129 | %dir %{py_sitedir}/kolab |
130 | %attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so | |
e431bf77 | 131 | %{py_sitedir}/kolab/calendaring.py[co] |
039e7839 | 132 | %attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so |
e431bf77 | 133 | %{py_sitedir}/kolab/icalendar.py[co] |
039e7839 | 134 | %attr(755,root,root) %{py_sitedir}/kolab/_shared.so |
e431bf77 | 135 | %{py_sitedir}/kolab/shared.py[co] |