]> git.pld-linux.org Git - packages/libkolab.git/blame_incremental - libkolab.spec
- updated to 0.6.0
[packages/libkolab.git] / libkolab.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # build without tests
4%bcond_without php # PHP bindings
5%bcond_without python # Python bindings
6
7%define php_name php55
8Summary: Kolab Object Handling Library
9Name: libkolab
10Version: 0.6.0
11Release: 1
12License: LGPL v3+
13Group: Libraries
14Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
15# Source0-md5: 3c4fc1fec2dfcc0841f29de8f6ff0cd3
16Patch0: 0002-Make-libkolab-compile-with-upstream-kdepimlibs.patch
17URL: http://git.kolab.org/libkolab
18BuildRequires: QtCore-devel
19BuildRequires: curl-devel
20BuildRequires: kde4-kdepimlibs-devel >= 4.8
21BuildRequires: libkolabxml-devel >= 1.1
22BuildRequires: qt4-build
23BuildRequires: rpmbuild(macros) >= 1.600
24BuildRequires: swig
25%if %{with php}
26BuildRequires: %{php_name}-devel
27BuildRequires: %{php_name}-cli
28%if %{with tests}
29BuildRequires: %{php_name}-pcre
30%endif
31BuildRequires: %{php_name}-program
32BuildRequires: swig-php
33%endif
34%if %{with python}
35BuildRequires: python-devel
36BuildRequires: swig-python
37%endif
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41The libkolab library is an advanced library to handle Kolab objects.
42
43%package devel
44Summary: Kolab library development headers
45Group: Development/Languages/PHP
46Requires: %{name} = %{version}-%{release}
47Requires: libkolabxml-devel >= 1.0
48
49%description devel
50Development headers for the Kolab object libraries.
51
52%package -n %{php_name}-kolab
53Summary: PHP Bindings for libkolab
54Group: Libraries
55Requires: %{name} = %{version}-%{release}
56%{?requires_php_extension}
57
58%description -n %{php_name}-kolab
59PHP Bindings for libkolab.
60
61%package -n python-kolab
62Summary: Python bindings for libkolab
63Group: Libraries
64Requires: %{name} = %{version}-%{release}
65
66%description -n python-kolab
67Python bindings for libkolab.
68
69%prep
70%setup -q
71%patch0 -p1
72
73%build
74install -d build
75cd build
76%cmake \
77 -Wno-fatal-errors -Wno-errors \
78 -DINCLUDE_INSTALL_DIR=%{_includedir} \
79 -DLIB_INSTALL_DIR=%{_libdir} \
80%if %{with php}
81 -DPHP_BINDINGS=ON \
82 -DPHP_INSTALL_DIR=%{php_extensiondir} \
83 -DPHP_EXECUTABLE=%{__php} \
84%endif
85%if %{with python}
86 -DPYTHON_BINDINGS=ON \
87 -DPYTHON_INSTALL_DIR=%{py_sitedir} \
88%endif
89 ..
90%{__make}
91
92%if %{with tests}
93cd tests
94./benchmarktest || :
95./calendaringtest || :
96./formattest || :
97./freebusytest || :
98./icalendartest || :
99./kcalconversiontest || :
100./upgradetest || :
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
105%{__make} -C build install \
106 DESTDIR=$RPM_BUILD_ROOT
107
108%if %{with php}
109install -d $RPM_BUILD_ROOT%{php_data_dir}
110mv $RPM_BUILD_ROOT{%{php_extensiondir}/*.php,%{php_data_dir}}
111%endif
112
113%if %{with python}
114%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
115%py_comp $RPM_BUILD_ROOT%{py_sitedir}
116%py_postclean
117%endif
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%post -p /sbin/ldconfig
123%postun -p /sbin/ldconfig
124
125%files
126%defattr(644,root,root,755)
127%attr(755,root,root) %{_libdir}/%{name}.so.*.*
128%attr(755,root,root) %ghost %{_libdir}/%{name}.so.0
129
130%files devel
131%defattr(644,root,root,755)
132%attr(755,root,root) %{_libdir}/%{name}.so
133%{_libdir}/cmake/Libkolab
134%{_includedir}/kolab
135
136%if %{with php}
137%files -n %{php_name}-kolab
138%defattr(644,root,root,755)
139%attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so
140%attr(755,root,root) %{php_extensiondir}/kolabicalendar.so
141%attr(755,root,root) %{php_extensiondir}/kolabobject.so
142%attr(755,root,root) %{php_extensiondir}/kolabshared.so
143%{php_data_dir}/kolabcalendaring.php
144%{php_data_dir}/kolabicalendar.php
145%{php_data_dir}/kolabobject.php
146%{php_data_dir}/kolabshared.php
147%endif
148
149%if %{with python}
150%files -n python-kolab
151%defattr(644,root,root,755)
152%dir %{py_sitedir}/kolab
153%attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so
154%attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so
155%attr(755,root,root) %{py_sitedir}/kolab/_kolabobject.so
156%attr(755,root,root) %{py_sitedir}/kolab/_shared.so
157%{py_sitedir}/kolab/calendaring.py[co]
158%{py_sitedir}/kolab/icalendar.py[co]
159%{py_sitedir}/kolab/kolabobject.py[co]
160%{py_sitedir}/kolab/shared.py[co]
161%endif
This page took 0.088462 seconds and 4 git commands to generate.