Projects
Kolab:16
libkolabxml
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 30
View file
libkolabxml.spec
Changed
@@ -13,6 +13,7 @@ %global with_java 1 %global with_php 1 %global with_python 1 +%global with_python3 1 %{expand: %(if `php-config --vernum` -gt 70000 ; then echo %%global with_php7 1; else echo %%global with_php7 0; fi)} @@ -34,12 +35,15 @@ %{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif -# Filter out private python and php libs. Does not work on EPEL5, -# therefor we use it conditionally -%if 0%{?with_php} > 0 -%if 0%{?with_python} > 0 +%if 0%{?with_python3} > 0 +%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%endif + +%if 0%{?with_python3} > 0 %{?filter_setup: %filter_provides_in %{python2_sitearch}/.*\.so$ +%filter_provides_in %{python3_sitearch}/.*\.so$ %filter_provides_in %{php_extdir}/.*\.so$ %filter_setup } @@ -49,14 +53,6 @@ %filter_setup } %endif -%else -%if 0%{?with_python} > 0 -%{?filter_setup: -%filter_provides_in %{python2_sitearch}/.*\.so$ -%filter_setup -} -%endif -%endif %if 0%{?suse_version} Name: libkolabxml1 @@ -86,6 +82,7 @@ BuildRequires: gcc-c++ BuildRequires: libcurl-devel BuildRequires: make + %if 0%{?suse_version} BuildRequires: qt-devel %else @@ -105,6 +102,13 @@ BuildRequires: xerces-c-devel %endif +%if 0%{?rhel} >= 8 || 0%{?fedora} +BuildRequires: python3-devel +BuildRequires: python36 +%else +BuildRequires: python +%endif + Provides: libkolabxml%{?_isa} = %{version} %if 0%{?with_csharp} < 1 @@ -127,6 +131,11 @@ Provides: python-kolabformat = %{version}-%{release} %endif +%if 0%{?with_python3} < 1 +Obsoletes: python3-kolabformat < %{version}-%{release} +Provides: python3-kolabformat = %{version}-%{release} +%endif + %description The libkolabxml parsing library interprets Kolab XML formats (xCal, xCard) with bindings for Python, PHP and other languages. The language bindings @@ -168,6 +177,9 @@ Requires: python-devel %endif %endif +%if 0%{?with_python3} > 0 +Requires: python3-devel +%endif %if 0%{?suse_version} Requires: qt-devel %else @@ -342,6 +354,22 @@ bindings provided through libkolabxml. %endif +%if 0%{?with_python3} > 0 +%package -n python3-kolabformat +Summary: Python3 bindings for libkolabxml +Group: System Environment/Libraries +Requires: libkolabxml%{?_isa} = %{version} +%if 0%{?suse_version} +Obsoletes: python3-%{name} < %{version} +Provides: python3-%{name} = %{version} +%endif +BuildRequires: python3-devel + +%description -n python3-kolabformat +The PyKolab format package offers a comprehensive Python library using the +bindings provided through libkolabxml. +%endif + %prep %setup -q -c -n libkolabxml-%{version} pwd @@ -378,9 +406,17 @@ popd %endif +%if 0%{?with_python3} > 0 +cp -a libkolabxml-%{version} libkolabxml-%{version}-python3 +%endif + %build pushd %{name}-%{version} -python utils/zonetabconversion.py +%if 0%{?rhel} >= 8 || 0%{?fedora} +%{python3} utils/zonetabconversion.py +%else +%{__python2} utils/zonetabconversion.py +%endif popd %if 0%{?plesk} @@ -393,6 +429,9 @@ cp %{name}-%{version}/tztable.h %{name}-%{version}-7.3/. cp %{name}-%{version}/tztable.h %{name}-%{version}-7.4/. %endif +%if 0%{?with_python3} > 0 +cp %{name}-%{version}/tztable.h %{name}-%{version}-python3/. +%endif pushd %{name}-%{version} rm -rf build @@ -451,6 +490,30 @@ popd popd +%if 0%{?with_python3} > 0 + pushd %{name}-%{version}-python3 + rm -rf build + mkdir -p build + pushd build + %cmake \ + -DBoost_NO_BOOST_CMAKE=TRUE \ + -Wno-fatal-errors -Wno-errors \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_PREFIX_PATH=%{_libdir} \ +%if 0%{?rhel} >= 8 || 0%{?fedora} + -DQT5_BUILD=ON \ +%endif + -DINCLUDE_INSTALL_DIR=%{_includedir} \ + -DPYTHON_BINDINGS=ON \ + -DPYTHON_INCLUDE_DIRS=%{python3_include} \ + -DPYTHON_INSTALL_DIR=%{python3_sitearch} \ + .. + make + popd + popd +%endif + + %if 0%{?plesk} %if 0%{?rhel} < 8 || 0%{?fedora} for version in 5.6 7.0 7.1 7.2 7.3 7.4; do @@ -501,6 +564,14 @@ %endif popd +%if 0%{?with_python3} > 0 + pushd %{name}-%{version}-python3 + pushd build + make install DESTDIR=%{buildroot} INSTALL='install -p' + popd + popd +%endif + %if 0%{?plesk} %if 0%{?rhel} < 8 || 0%{?fedora} for version in 5.6 7.0 7.1 7.2 7.3 7.4; do @@ -533,9 +604,9 @@ # Make sure libkolabxml.so.* is found, otherwise the tests fail export LD_LIBRARY_PATH=$( pwd )/src/ pushd tests -./bindingstest ||: -./conversiontest ||: -./parsingtest ||: +./bindingstest +./conversiontest +./parsingtest popd %if 0%{?with_php} > 0 php -d enable_dl=On -dextension=src/php/kolabformat.so src/php/test.php ||: @@ -545,6 +616,13 @@ %endif
View file
debian.rules
Changed
@@ -43,6 +43,7 @@ dh_gencontrol override_dh_auto_build: + # Build plesk php versions if -f /etc/plesk-release ; then \ for version in $(PHP_VERSIONS) ; do \ if ! -f "/opt/plesk/php/$${version}/bin/php-config" ; then \ @@ -57,12 +58,16 @@ done ; \ fi + # Build php vanilla if $$(php-config --vernum) -gt 70000 ; then \ sed -r -i -e 's/-c\+\+ -php0-9? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php0-9? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi + dh_auto_build --buildsystem cmake --builddirectory php-vanilla + + # Build python versions via pybuild dh_auto_build override_dh_auto_configure: @@ -79,7 +84,7 @@ fi ; \ dh_auto_configure --buildsystem cmake --builddirectory php-$${version} -- -DLIB_INSTALL_DIR=/usr/lib \ -DQT5_BUILD=ON \ - -DBoost_NO_BOOST_CMAKE=TRUE \ + -DBoost_NO_BOOST_CMAKE=ON \ -DSWIG=/usr/bin/swig \ -DPHP_BINDINGS=ON \ -DPHP_INCLUDE_DIR=$$(/opt/plesk/php/$${version}/bin/php-config --include-dir) \ @@ -90,6 +95,7 @@ done ; \ fi + # Configure php vanilla if $$(php-config --vernum) -gt 70000 ; then \ sed -r -i -e 's/-c\+\+ -php0-9? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ @@ -98,19 +104,30 @@ grep kolabformat.i src/php/CMakeLists.txt - dh_auto_configure -- --configure-args \ - "-DLIB_INSTALL_DIR=/usr/lib \ + dh_auto_configure --buildsystem cmake --builddirectory php-vanilla -- \ + -DLIB_INSTALL_DIR=/usr/lib \ -DQT5_BUILD=ON \ - -DBoost_NO_BOOST_CMAKE=TRUE \ + -DBoost_NO_BOOST_CMAKE=ON \ -DPHP_BINDINGS=ON \ -DPHP_INSTALL_DIR=$(PHPEXT) \ -DPHP_EXECUTABLE=$(PHPBIN) \ - -DPHP_INCLUDE_DIR=$(PHPINC) \ + -DPHP_INCLUDE_DIR=$(PHPINC) + + # Configure python builds via pybuild + dh_auto_configure -- --configure-args \ + "-DLIB_INSTALL_DIR=/usr/lib \ + -DQT5_BUILD=ON \ + -DBoost_NO_BOOST_CMAKE=ON \ -DPYTHON_BINDINGS=ON \ -DPYTHON_INSTALL_DIR={install_dir}" override_dh_install: + # Install the PHP modules manually, because they depend on the PHP API version, + # which has to be determined dynamically, so we can't put it into an .install file. mkdir -p debian/tmp/usr/share/php + make -C php-vanilla install DESTDIR=$(PWD)/debian/tmp/ ; \ + mv -v debian/tmp/usr/lib/php*/$(PHPAPI)/kolabformat.php debian/tmp/usr/share/php/kolabformat.php + if -d "/etc/php/7.4/mods-available/" ; then \ echo "debian/kolabformat.ini etc/php/7.4/mods-available" >> debian/php-kolabformat.install ; \ elif -d "/etc/php/7.3/mods-available/" ; then \ @@ -126,7 +143,6 @@ else \ echo "debian/kolabformat.ini etc/php5/mods-available" >> debian/php-kolabformat.install ; \ fi - mv -v debian/tmp/usr/lib/php*/$(PHPAPI)/kolabformat.php debian/tmp/usr/share/php/kolabformat.php if -f /etc/plesk-release ; then \ for version in $(PHP_VERSIONS) ; do \
View file
libkolabxml.dsc
Changed
@@ -20,12 +20,12 @@ libxerces-c-dev, php-cgi | php5-cli, php-dev | php5-dev, - plesk-php70-dev | plesk-php71-dev | bash, - plesk-php71-dev | bash, - plesk-php72-dev | bash, - plesk-php73-dev | bash, - plesk-php74-dev | bash, psa | bash, + plesk-php70-dev | plesk-php71-dev | plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php71-dev | plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php73-dev | plesk-php74-dev | bash, + plesk-php74-dev | bash, python2-dev | python-dev, python-minimal | python2-minimal, python3-all-dev,
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.