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