File python-kde4.spec of Package python-kde4
#
# spec file for package python-kde4
#
# Copyright (c) 2013 SUSE LINUX Products 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: python-kde4
Version: 4.10.0
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
BuildRequires: fdupes
BuildRequires: kdebase4-workspace-devel
BuildRequires: libjasper-devel
BuildRequires: libkdepimlibs4-devel
BuildRequires: nepomuk-core-devel
BuildRequires: okular-devel
BuildRequires: python-qt4-devel
BuildRequires: xz
Requires: python-qt4
Requires: update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%kde4_runtime_requires
%kde4_akonadi_requires
%description
Python KDE bindings using PyQt4 SIP technology.
%package common
Summary: Common files needed to build additional bindings for PyKDE4
Group: Development/Libraries/KDE
%description common
This package contains common files required to build additional bindings for
PyKDE4. It is used with either Python 2 or 3.
%package devel
Summary: Development files of python-kde4
Group: Development/Libraries/KDE
Requires: %{name} = %{version}
Requires: %{name}-common = %{version}
Requires: python-qt4-devel
%description devel
This package contains development files for the Python bindings for the
KDE Development Platform.
%prep
%setup -q -n pykde4-%{version}
%build
%cmake_kde4 -d build -- -DPYKDEUIC4_ALTINSTALL=TRUE -DINSTALL_PYTHON_FILES_IN_PYTHON_PREFIX=TRUE
%make_jobs
%install
cd build
%kde4_makeinstall
%fdupes -s %{buildroot}%{_datadir}
%post
/sbin/ldconfig
update-alternatives --install %{_bindir}/pykdeuic4 pykdeuic4 %{_bindir}/pykdeuic4-%{py_ver} 50
%postun
/sbin/ldconfig
update-alternatives --remove pykdeuic4 %{_bindir}/pykdeuic4-%{py_ver}
if [ -e "%{_sysconfdir}/alternatives/pykdeuic4" ]; then
update-alternatives --auto pykdeuic4
fi
%files
%defattr(-,root,root)
%{py_sitedir}/PyKDE4
%exclude %{_kde4_appsdir}/pykde4/examples
%{_kde4_appsdir}/pykde4
%{_kde4_modulesdir}/kpythonpluginfactory.so
%{_kde4_bindir}/pykdeuic4-%{py_ver}
%{py_sitedir}/PyQt4/uic/widget-plugins
%{py_sitedir}/PyQt4/uic/pykdeuic4.*
%files common
%defattr(-,root,root)
%{_datadir}/sip/PyKDE4
%files devel
%defattr(-,root,root)
%{_kde4_appsdir}/pykde4/examples
%changelog