File python3-kde4.spec of Package python-kde4
#
# spec file for package python3-kde4
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python3-kde4
Version: 4.14.3
Release: 0
Summary: Python bindings for KDE 4
License: LGPL-2.1+ and GPL-2.0+
Group: Development/Libraries/KDE
Url: https://projects.kde.org/projects/kde/kdebindings/pykde4
Source0: pykde4-%{version}.tar.xz
Patch0: arm-qreal-float.patch
Patch1: arm-avoid-return-type-confusion.patch
# PATCH-FIX-UPSTREAM fix-build.diff boo#975915 wbauer@tmo.at -- fix build on Factory
Patch2: fix-build.diff
# PATCH-FIX-UPSTREAM fix-build-with-sip-4.19.patch -- fix build with python-sip 4.19
Patch3: fix-build-with-sip-4.19.patch
# PATCH-FIX-OPENSUSE Annotate-KAutoMount-as-Abstract.patch boo#1026767 wbauer@tmo.at -- fix build with python-sip 4.19.1
Patch4: Annotate-KAutoMount-as-Abstract.patch
BuildRequires: fdupes
BuildRequires: libjasper-devel
BuildRequires: libkde4-devel
BuildRequires: python3-qt4-devel
BuildRequires: xz
Requires: python3-qt4
Requires: update-alternatives
Recommends: %{name}-doc
Recommends: %{name}-khtml
Recommends: %{name}-knewstuff
Recommends: %{name}-plasma
Recommends: %{name}-phonon
# no more nepomuk & soprano with KDE's 4.13 release
Obsoletes: %{name}-akonadi
Obsoletes: %{name}-nepomuk
Obsoletes: %{name}-soprano
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%requires_python3_sip_api
%kde4_runtime_requires
%description
Bindings for the KDE Development Platform based on PyQt4 and SIP. Use of these bindings
allows to write Python applications that use the KDE C++ libraries.
%package doc
Summary: Documentation for Python bindings for KDE 4
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%description doc
This package contains documentation for the KDE 4 python bindings.
%package khtml
Summary: Python bindings for KDE 4 - KHTML
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%kde4_runtime_requires
%description khtml
This package contains Python bindings for the KHTML rendering engine, which can be
used from Python applications.
%package knewstuff
Summary: Python bindings for KDE 4 - KNewStuff
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%description knewstuff
This package contains Python bindings for the KNewStuff library. It allows the use of
the GHNS framework from Python.
%package plasma
Summary: Python bindings for KDE 4 - Plasma
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%kde4_runtime_requires
%description plasma
This package contains Python bindings for the Plasma library. In
conjunction with the Python script engne, it allows writing Plasma widgets
in Python.
%package phonon
Summary: Python bindings for KDE 4 - Phonon
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%description phonon
This package contains Python bindings for the Phonon multimedia libraries.
These bindings allow the use of Phonon, and its associated media capabilities,
in Python applications.
%package soprano
Summary: Python bindings for KDE 4 - Soprano
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
%description soprano
This pacakge contains Python bindings for the Soprano semantic library.
It allows the use of the library from Python applications.
%package devel
Summary: Development files of %{name}
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Requires: %{name}-khtml = %{version}
Requires: %{name}-knewstuff = %{version}
Requires: %{name}-phonon = %{version}
Requires: %{name}-plasma = %{version}
Requires: python-qt4-devel
%description devel
This package contains development files for the Python bindings for the
KDE Development Platform. It also contains common files required to build
additional bindings for PyKDE4. It is used with either Python 2 or 3.
%prep
%setup -q -n pykde4-%{version}
%patch0
%ifarch %arm
%patch1
%endif
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%cmake_kde4 -d build -- -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYKDEUIC4_ALTINSTALL=TRUE -DINSTALL_PYTHON_FILES_IN_PYTHON_PREFIX=TRUE
%make_jobs
%install
cd build
%kde4_makeinstall
%fdupes -s %{buildroot}%{_datadir}
rm -rf %{buildroot}%{_kde4_appsdir}/pykde4/examples
rm -rf %{buildroot}%{_datadir}/sip/PyKDE4
%post
update-alternatives --install %{_bindir}/pykdeuic4 pykdeuic4 %{_bindir}/pykdeuic4-%{py3_ver} 40
%postun
update-alternatives --remove pykdeuic4 %{_bindir}/pykdeuic4-%{py3_ver}
if [ -e "%{_sysconfdir}/alternatives/pykdeuic4" ]; then
update-alternatives --auto pykdeuic4
fi
%files
%defattr(-,root,root)
%doc COPYING COPYING.LESSER
%{_kde4_appsdir}/pykde4
%{_bindir}/pykdeuic4-%{py3_ver}
%dir %{python3_sitearch}/PyKDE4
%{python3_sitearch}/PyKDE4/__init__.*
%{python3_sitearch}/PyKDE4/__pycache__
%{python3_sitearch}/PyKDE4/dnssd.so
%{python3_sitearch}/PyKDE4/kdecore.so
%{python3_sitearch}/PyKDE4/kdeui.so
%{python3_sitearch}/PyKDE4/kio.so
%{python3_sitearch}/PyKDE4/kparts.so
%{python3_sitearch}/PyKDE4/kterminal.so
%{python3_sitearch}/PyKDE4/ktexteditor.so
%{python3_sitearch}/PyKDE4/kutils.so
%{python3_sitearch}/PyKDE4/solid.so
#{python3_sitearch}/PyKDE4/pykdeconfig.*
%{python3_sitearch}/PyQt4/uic/widget-plugins
%{python3_sitearch}/PyQt4/uic/pykdeuic4.*
%{python3_sitearch}/PyQt4/uic/__pycache__/
%files doc
%doc docs/html
%files khtml
%defattr(-,root,root)
%{python3_sitearch}/PyKDE4/khtml.so
%files knewstuff
%defattr(-,root,root)
%{python3_sitearch}/PyKDE4/knewstuff.so
%files plasma
%defattr(-,root,root)
%{python3_sitearch}/PyKDE4/plasma.so
%files phonon
%defattr(-,root,root)
%{python3_sitearch}/PyKDE4/phonon.so
%files devel
%defattr(-,root,root)
%doc examples
%changelog