]> git.pld-linux.org Git - packages/libkolab.git/blobdiff - libkolab.spec
- release 14 (by relup.sh)
[packages/libkolab.git] / libkolab.spec
index 768c43c910d73120439447995e6972a0c7fafe98..81ca5b208e9c76f5f952e7c0efa1fe077fd90221 100644 (file)
@@ -1,27 +1,40 @@
 #
 # Conditional build:
 %bcond_without tests           # build without tests
+%bcond_with    php             # PHP bindings
+%bcond_without python          # Python bindings
 
+%define                php_name        php56
 Summary:       Kolab Object Handling Library
 Name:          libkolab
-Version:       0.3.1
-Release:       1
+Version:       0.6.0
+Release:       14
 License:       LGPL v3+
 Group:         Libraries
-URL:           http://git.kolab.org/libkolab
 Source0:       http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 99f2b2c519c3ebaa57f8f520e8880e9a
-Patch0:                0001-Fix-kolab-errorhandler.h-kolabformat-errorhandler.h.patch
+# Source0-md5: 3c4fc1fec2dfcc0841f29de8f6ff0cd3
+Patch0:                0002-Make-libkolab-compile-with-upstream-kdepimlibs.patch
+URL:           http://git.kolab.org/libkolab
 BuildRequires: QtCore-devel
 BuildRequires: curl-devel
 BuildRequires: kde4-kdepimlibs-devel >= 4.8
-BuildRequires: libkolabxml-devel >= 0.8
-BuildRequires: php-devel >= 4:5.0.4
-BuildRequires: python-devel
+BuildRequires: libkolabxml-devel >= 1.1
 BuildRequires: qt4-build
 BuildRequires: rpmbuild(macros) >= 1.600
 BuildRequires: swig
+%if %{with php}
+BuildRequires: %{php_name}-devel
+BuildRequires: %{php_name}-cli
+%if %{with tests}
+BuildRequires: %{php_name}-pcre
+%endif
+BuildRequires: %{php_name}-program
 BuildRequires: swig-php
+%endif
+%if %{with python}
+BuildRequires: python-devel
+BuildRequires: swig-python
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -31,21 +44,18 @@ The libkolab library is an advanced library to handle Kolab objects.
 Summary:       Kolab library development headers
 Group:         Development/Languages/PHP
 Requires:      %{name} = %{version}-%{release}
-Requires:      libkolabxml-devel >= 0.8
-Requires:      php-devel
-Requires:      pkgconfig
-Requires:      python-devel
+Requires:      libkolabxml-devel >= 1.0
 
 %description devel
 Development headers for the Kolab object libraries.
 
-%package -n php-kolab
+%package -n %{php_name}-kolab
 Summary:       PHP Bindings for libkolab
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 %{?requires_php_extension}
 
-%description -n php-kolab
+%description -n %{php_name}-kolab
 PHP Bindings for libkolab.
 
 %package -n python-kolab
@@ -61,22 +71,26 @@ Python bindings for libkolab.
 %patch0 -p1
 
 %build
-rm -rf build
 install -d build
 cd build
 %cmake \
        -Wno-fatal-errors -Wno-errors \
        -DINCLUDE_INSTALL_DIR=%{_includedir} \
+       -DLIB_INSTALL_DIR=%{_libdir} \
+%if %{with php}
        -DPHP_BINDINGS=ON \
        -DPHP_INSTALL_DIR=%{php_extensiondir} \
+       -DPHP_EXECUTABLE=%{__php} \
+%endif
+%if %{with python}
        -DPYTHON_BINDINGS=ON \
        -DPYTHON_INSTALL_DIR=%{py_sitedir} \
+%endif
        ..
 %{__make}
-cd -
 
 %if %{with tests}
-cd build/tests
+cd tests
 ./benchmarktest || :
 ./calendaringtest || :
 ./formattest || :
@@ -91,8 +105,16 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with php}
 install -d $RPM_BUILD_ROOT%{php_data_dir}
 mv $RPM_BUILD_ROOT{%{php_extensiondir}/*.php,%{php_data_dir}}
+%endif
+
+%if %{with python}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -111,21 +133,29 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/cmake/Libkolab
 %{_includedir}/kolab
 
-%files -n php-kolab
+%if %{with php}
+%files -n %{php_name}-kolab
 %defattr(644,root,root,755)
 %attr(755,root,root) %{php_extensiondir}/kolabcalendaring.so
 %attr(755,root,root) %{php_extensiondir}/kolabicalendar.so
+%attr(755,root,root) %{php_extensiondir}/kolabobject.so
 %attr(755,root,root) %{php_extensiondir}/kolabshared.so
 %{php_data_dir}/kolabcalendaring.php
 %{php_data_dir}/kolabicalendar.php
+%{php_data_dir}/kolabobject.php
 %{php_data_dir}/kolabshared.php
+%endif
 
+%if %{with python}
 %files -n python-kolab
 %defattr(644,root,root,755)
 %dir %{py_sitedir}/kolab
 %attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so
-%{py_sitedir}/kolab/calendaring.py[co]
 %attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so
-%{py_sitedir}/kolab/icalendar.py[co]
+%attr(755,root,root) %{py_sitedir}/kolab/_kolabobject.so
 %attr(755,root,root) %{py_sitedir}/kolab/_shared.so
+%{py_sitedir}/kolab/calendaring.py[co]
+%{py_sitedir}/kolab/icalendar.py[co]
+%{py_sitedir}/kolab/kolabobject.py[co]
 %{py_sitedir}/kolab/shared.py[co]
+%endif
This page took 0.06877 seconds and 4 git commands to generate.