Projects
Kolab:Winterfell
libkolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 50
View file
libkolab.spec
Changed
@@ -17,9 +17,11 @@ %endif %{!?php_apiver: %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)} -# Filter out private python and php libs. Does not work on EPEL5, -# therefor we use it conditionally + +%global with_python3 1 + %{?filter_setup: +%filter_provides_in %{python2_sitearch}/.*\.so$ %filter_provides_in %{python3_sitearch}/.*\.so$ %filter_provides_in %{php_extdir}/.*\.so$ %filter_setup @@ -43,7 +45,6 @@ BuildRequires: cmake %if 0%{?rhel} > 7 || 0%{?fedora} -BuildRequires: kf5-kcoreaddons-devel BuildRequires: kf5-kcalendarcore-devel BuildRequires: kf5-kmime-devel %else @@ -51,6 +52,11 @@ # fork of various kde 4.9 libraries that depend on kde*, and that have no place in el6. BuildRequires: libcalendaring-devel >= 4.9.1 %endif +%if 0%{?suse_version} +BuildRequires: qt-devel +%else +BuildRequires: qt5-qtbase-devel +%endif BuildRequires: libcurl-devel BuildRequires: libkolabxml-devel >= 1.0 BuildRequires: make @@ -69,11 +75,6 @@ %endif BuildRequires: python3-devel -%if 0%{?suse_version} -BuildRequires: qt-devel -%else -BuildRequires: qt5-qtbase-devel -%endif Provides: libkolab%{?_isa} = %{version} %description @@ -87,7 +88,6 @@ Summary: Kolab library development headers Requires: libkolab%{?_isa} = %{version} %if 0%{?rhel} > 7 || 0%{?fedora} -BuildRequires: kf5-kcoreaddons-devel BuildRequires: kf5-kcalendarcore-devel BuildRequires: kf5-kmime-devel %if 0%{?fedora} >= 21 @@ -102,7 +102,7 @@ Requires: libkolabxml-devel >= 1.0 Requires: php-devel Requires: pkgconfig -Requires: python36-devel +Requires: python3-devel %if 0%{?suse_version} %description -n libkolab-devel @@ -207,6 +207,19 @@ %description -n python-kolab Python bindings for libkolab +%package -n python3-kolab +Summary: Python bindings for libkolab +Group: System Environment/Libraries +Requires: libkolab%{?_isa} = %{version} +Requires: python3-kolabformat >= 1.0.0 +%if 0%{?suse_version} +Obsoletes: python3-%{name} < %{version} +Provides: python3-%{name} = %{version} +%endif + +%description -n python3-kolab +Python bindings for libkolab + %prep %setup -q -c -n libkolab-%{version} @@ -241,6 +254,10 @@ popd %endif +%if 0%{?with_python3} +cp -a libkolab-%{version} libkolab-%{version}-python3 +%endif + %build pushd %{name}-%{version} rm -rf build @@ -282,12 +299,42 @@ -DPHP_BINDINGS=ON \ -DPHP_INSTALL_DIR=%{php_extdir} \ -DPYTHON_BINDINGS=ON \ - -DPYTHON_INSTALL_DIR=%{python3_sitearch} \ + -DPYTHON_INSTALL_DIR=%{python2_sitearch} \ .. make popd popd + +%if 0%{with_python3} + pushd %{name}-%{version}-python3 + rm -rf build + mkdir -p build + pushd build + %cmake \ +%if 0%{?with_at} + -DBUILD_TOOLS:BOOL=OFF \ +%endif + -DCMAKE_C_FLAGS:STRING="-DNDEBUG -DQT_NO_DEBUG" \ + -DBoost_NO_BOOST_CMAKE=TRUE \ + -Wno-fatal-errors -Wno-errors \ + -DINCLUDE_INSTALL_DIR=%{_includedir} \ +%if 0%{?rhel} >= 8 || 0%{?fedora} + -DQT5_BUILD=ON \ +%endif + -DINCLUDE_INSTALL_DIR=%{_includedir} \ +%if 0%{?rhel} < 8 && 0%{?fedora} < 20 + -DUSE_LIBCALENDARING=ON \ +%endif + -DPYTHON_BINDINGS=ON \ + -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 @@ -383,7 +430,14 @@ done %endif +touch %{buildroot}/%{python2_sitearch}/kolab/__init__.py +%if 0%{?with_python3} +pushd %{name}-%{version}-python3 +pushd build +make install DESTDIR=%{buildroot} INSTALL='install -p' +popd touch %{buildroot}/%{python3_sitearch}/kolab/__init__.py +%endif %check pushd %{name}-%{version}/build/tests @@ -475,6 +529,17 @@ %endif %files -n python-kolab +%dir %{python2_sitearch}/kolab/ +%{python2_sitearch}/kolab/__init__.py* +%{python2_sitearch}/kolab/_calendaring.so +%{python2_sitearch}/kolab/calendaring.py* +%{python2_sitearch}/kolab/_kolabobject.so* +%{python2_sitearch}/kolab/kolabobject.py* +%{python2_sitearch}/kolab/_shared.so* +%{python2_sitearch}/kolab/shared.py* + +%if 0%{?with_python3} +%files -n python3-kolab %dir %{python3_sitearch}/kolab/ %{python3_sitearch}/kolab/__init__.py* %{python3_sitearch}/kolab/_calendaring.so @@ -483,6 +548,8 @@ %{python3_sitearch}/kolab/kolabobject.py* %{python3_sitearch}/kolab/_shared.so* %{python3_sitearch}/kolab/shared.py* +%{python3_sitearch}/kolab/__pycache__/ +%endif %changelog * Tue Jan 04 2022 Christian Mollekopf <mollekopf@kolabsys.com> - 3.0.1-1
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
.