]> git.pld-linux.org Git - packages/libkolabxml.git/blobdiff - libkolabxml.spec
- release 9 (by relup.sh)
[packages/libkolabxml.git] / libkolabxml.spec
index 1776cc93912b40586c7cf5b601267959c3ea53f0..992990fdb59b13f8eb122ade81c5b2463f4f9051 100644 (file)
@@ -1,33 +1,44 @@
 #
 # Conditional build:
 %bcond_without tests           # build without tests
+%bcond_with    php             # PHP bindings
+%bcond_without python          # Python bindings
 
+%define                php_name        php55
 Summary:       Kolab XML format collection parser library
 Name:          libkolabxml
-Version:       0.8.1
-Release:       1
+Version:       1.1.6
+Release:       9
 License:       LGPL v3+
 Group:         Libraries
-URL:           http://www.kolab.org/
 Source0:       http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
-# Source0-md5: a02541b35153334c69ee1845dfe464c6
+# Source0-md5: eec4b8bf117a6e263eed9ee800ae3aa6
+URL:           http://www.kolab.org/
 BuildRequires: QtCore-devel
 BuildRequires: boost-devel
 BuildRequires: cmake >= 2.6
 BuildRequires: curl-devel
 BuildRequires: e2fsprogs-devel
-BuildRequires: kde4-kdelibs-devel
-BuildRequires: kde4-kdepimlibs-devel
 BuildRequires: libstdc++-devel
 BuildRequires: libuuid-devel
-BuildRequires: php-devel >= 5.3
-BuildRequires: python-devel
 BuildRequires: qt4-build
 BuildRequires: rpmbuild(macros) >= 1.600
 BuildRequires: swig
-BuildRequires: swig-php
 BuildRequires: xerces-c-devel
 BuildRequires: xsd
+%if %{with python}
+BuildRequires: python-devel
+BuildRequires: swig-python
+%endif
+%if %{with php}
+BuildRequires: %{php_name}-cli
+%if %{with tests}
+BuildRequires: %{php_name}-pcre
+%endif
+BuildRequires: %{php_name}-program
+BuildRequires: %{php_name}-devel
+BuildRequires: swig-php
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,12 +55,8 @@ Requires:    boost-devel
 Requires:      cmake >= 2.6
 Requires:      curl-devel
 Requires:      e2fsprogs-devel
-Requires:      kde4-kdelibs-devel
-Requires:      kde4-kdepimlibs-devel
 Requires:      libstdc++-devel
 Requires:      libuuid-devel
-Requires:      php-devel >= 5.3
-Requires:      python-devel
 Requires:      swig
 Requires:      xerces-c-devel
 Requires:      xsd
@@ -57,13 +64,13 @@ Requires:   xsd
 %description devel
 Development headers for the Kolab XML libraries.
 
-%package -n php-kolabformat
+%package -n %{php_name}-kolabformat
 Summary:       PHP bindings for libkolabxml
 Group:         Development/Languages/PHP
 Requires:      %{name} = %{version}-%{release}
 %{?requires_php_extension}
 
-%description -n php-kolabformat
+%description -n %{php_name}-kolabformat
 The PHP kolabformat package offers a comprehensible PHP library using
 the bindings provided through libkolabxml.
 
@@ -87,11 +94,17 @@ cd build
        -DCMAKE_SKIP_RPATH=ON \
        -DCMAKE_PREFIX_PATH=%{_libdir} \
        -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
-       -DPYTHON_INCLUDE_DIRS=%{python_include} \
+       -DLIB_INSTALL_DIR:PATH=%{_libdir} \
+%if %{with php}
+       -DPHP_EXECUTABLE=%{__php} \
        -DPHP_BINDINGS=ON \
        -DPHP_INSTALL_DIR=%{php_extensiondir} \
+%endif
+%if %{with python}
        -DPYTHON_BINDINGS=ON \
+       -DPYTHON_INCLUDE_DIRS=%{python_include} \
        -DPYTHON_INSTALL_DIR=%{py_sitedir} \
+%endif
        ..
 %{__make}
 cd ..
@@ -101,54 +114,73 @@ cd build
 # Make sure libkolabxml.so.* is found, otherwise the tests fail
 export LD_LIBRARY_PATH=$(pwd)/src
 cd tests
-./bindingstest ||:
-./conversiontest ||:
-./parsingtest ||:
+./bindingstest
+./conversiontest
+./parsingtest
 cd ..
-php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||:
-python src/python/test.py ||:
+%if %{with php}
+cd src/php
+php -d 'enable_dl=On' '-dextension=../../src/php/kolabformat.so' test.php
+cd ../..
+%endif
+%if %{with python}
+cd src/python
+# FIXME
+%{__python} test.py ||
+cd ../..
+%endif
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} -C build install \
        INSTALL='install -p' \
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{php_data_dir}
+%if %{with php}
+install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_data_dir}}
 mv $RPM_BUILD_ROOT%{php_extensiondir}/kolabformat.php $RPM_BUILD_ROOT%{php_data_dir}/kolabformat.php
-
-install -d $RPM_BUILD_ROOT%{php_sysconfdir}
-cat > $RPM_BUILD_ROOT%{php_sysconfdir}/kolabformat.ini <<EOF
+cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/kolabformat.ini <<EOF
+; Enable kolabformat extension module
 extension=kolabformat.so
 EOF
+%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
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc DEVELOPMENT NEWS README
 %attr(755,root,root) %{_libdir}/libkolabxml.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libkolabxml.so.0
+%attr(755,root,root) %ghost %{_libdir}/libkolabxml.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %{_includedir}/kolabxml
-%{_libdir}/*.so
+%{_libdir}/libkolabxml.so
 %{_libdir}/cmake/Libkolabxml
 
-%files -n php-kolabformat
+%if %{with php}
+%files -n %{php_name}-kolabformat
 %defattr(644,root,root,755)
-%config(noreplace) %{php_sysconfdir}/kolabformat.ini
-%{php_extensiondir}/kolabformat.so
+%config(noreplace) %{php_sysconfdir}/conf.d/kolabformat.ini
+%attr(755,root,root) %{php_extensiondir}/kolabformat.so
 %{php_data_dir}/kolabformat.php
+%endif
 
+%if %{with python}
 %files -n python-kolabformat
 %defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_kolabformat.so
 %{py_sitedir}/kolabformat.py[co]
-%{py_sitedir}/_kolabformat.so
+%endif
This page took 0.067902 seconds and 4 git commands to generate.