]> git.pld-linux.org Git - packages/libkolab.git/blobdiff - libkolab.spec
- release 14 (by relup.sh)
[packages/libkolab.git] / libkolab.spec
index c670aa0eac14eded90e93e71efb77b9b892b2161..81ca5b208e9c76f5f952e7c0efa1fe077fd90221 100644 (file)
@@ -1,27 +1,40 @@
-# TODO
-# - pldize this package!
-#  - file attrs
-#  - pld cmake macros
-#  - tests to build, not %check and add bcond
-#  - drop rhel/fedora dist macros
+#
+# 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:       0.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
+# 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: libcalendaring-devel
-BuildRequires: libcalendaring-devel
-BuildRequires: libkolabxml-devel >= 0.7
-BuildRequires: php-devel >= 4:5.0.4
+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: qt-devel
-BuildRequires: rpmbuild(macros) >= 1.519
+BuildRequires: swig-python
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -29,23 +42,20 @@ The libkolab library is an advanced library to handle Kolab objects.
 
 %package devel
 Summary:       Kolab library development headers
-Group:         Development/Libraries
+Group:         Development/Languages/PHP
 Requires:      %{name} = %{version}-%{release}
-Requires:      libkolabxml-devel >= 0.7
-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
@@ -58,43 +68,53 @@ Python bindings for libkolab.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-rm -rf build
 install -d build
 cd build
 %cmake \
        -Wno-fatal-errors -Wno-errors \
        -DINCLUDE_INSTALL_DIR=%{_includedir} \
-%if 0%{?rhel} < 7 && 0%{?fedora} < 17
-       -DUSE_LIBCALENDARING=ON \
-%endif
+       -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 tests
+./benchmarktest || :
+./calendaringtest || :
+./formattest || :
+./freebusytest || :
+./icalendartest || :
+./kcalconversiontest || :
+./upgradetest || :
+%endif
 
 %install
 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
 
-%check
-pushd build/tests
-./benchmarktest || :
-./calendaringtest || :
-./formattest || :
-./freebusytest || :
-./icalendartest || :
-./kcalconversiontest || :
-./upgradetest || :
-popd
+%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
@@ -104,25 +124,38 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%{_libdir}/%{name}.so.0
-%{_libdir}/%{name}.so.0.3
+%attr(755,root,root) %{_libdir}/%{name}.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/%{name}.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%{_libdir}/%{name}.so
+%attr(755,root,root) %{_libdir}/%{name}.so
 %{_libdir}/cmake/Libkolab
 %{_includedir}/kolab
 
-%files -n php-kolab
+%if %{with php}
+%files -n %{php_name}-kolab
 %defattr(644,root,root,755)
-%{php_data_dir}/calendaring.php
-%{php_data_dir}/icalendar.php
-%attr(755,root,root) %{php_extensiondir}/calendaring.so
-%attr(755,root,root) %{php_extensiondir}/icalendar.so
+%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)
-%{py_sitedir}/_calendaring.so
-%{py_sitedir}/calendaring.py[co]
-%{py_sitedir}/_icalendar.so
-%{py_sitedir}/icalendar.py[co]
+%dir %{py_sitedir}/kolab
+%attr(755,root,root) %{py_sitedir}/kolab/_calendaring.so
+%attr(755,root,root) %{py_sitedir}/kolab/_icalendar.so
+%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.045995 seconds and 4 git commands to generate.