]> git.pld-linux.org Git - packages/libkolabxml.git/blobdiff - libkolabxml.spec
- release 9 (by relup.sh)
[packages/libkolabxml.git] / libkolabxml.spec
index 6120be0b9eda3eeeeb1f95259427b3475694e3c1..992990fdb59b13f8eb122ade81c5b2463f4f9051 100644 (file)
@@ -1,34 +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:       1.0.1
-Release:       4
+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: 7adccfa0ed91ac954c815e8d13f334ee
+# 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_name}-devel >= 4:5.3
-BuildRequires: python-devel
 BuildRequires: qt4-build
 BuildRequires: rpmbuild(macros) >= 1.600
 BuildRequires: swig
-BuildRequires: swig-php
-BuildRequires: swig-python
 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
@@ -45,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_name}-devel >= 5.3
-Requires:      python-devel
 Requires:      swig
 Requires:      xerces-c-devel
 Requires:      xsd
@@ -85,16 +91,20 @@ install -d build
 cd build
 %cmake \
        -Wno-fatal-errors -Wno-errors \
-       -DPHP_EXECUTABLE=%{_bindir}/php \
        -DCMAKE_SKIP_RPATH=ON \
        -DCMAKE_PREFIX_PATH=%{_libdir} \
        -DINCLUDE_INSTALL_DIR=%{_includedir}/kolabxml \
        -DLIB_INSTALL_DIR:PATH=%{_libdir} \
-       -DPYTHON_INCLUDE_DIRS=%{python_include} \
+%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 ..
@@ -107,11 +117,18 @@ cd tests
 ./bindingstest
 ./conversiontest
 ./parsingtest
-cd ../src/php
+cd ..
+%if %{with php}
+cd src/php
 php -d 'enable_dl=On' '-dextension=../../src/php/kolabformat.so' test.php
-cd ../python
+cd ../..
+%endif
+%if %{with python}
+cd src/python
 # FIXME
 %{__python} test.py ||
+cd ../..
+%endif
 %endif
 
 %install
@@ -120,18 +137,20 @@ rm -rf $RPM_BUILD_ROOT
        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
@@ -148,16 +167,20 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %{_includedir}/kolabxml
-%{_libdir}/*.so
+%{_libdir}/libkolabxml.so
 %{_libdir}/cmake/Libkolabxml
 
+%if %{with php}
 %files -n %{php_name}-kolabformat
 %defattr(644,root,root,755)
-%config(noreplace) %{php_sysconfdir}/kolabformat.ini
+%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]
+%endif
This page took 0.074924 seconds and 4 git commands to generate.