File python-kde3.spec of Package python-kde3

#
# spec file for package python-kde3 (Version 3.16.2)
#
# Copyright (c) 2008 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-kde3
BuildRequires:  kdebase3-devel kdelibs3-devel python-devel python-qt3 python-sip-devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/Python
Summary:        Python Bindings for KDE
Requires:       python-qt3 >= %( echo `rpm -q --queryformat '%{VERSION}' python-qt3`)
Requires:       kdebase3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdebase3`)
Version:        3.16.7
Release:        1
Provides:       PyKDE = %{version}
Provides:       kdebindings3-python  = %{version}
Obsoletes:      kdebindings3-python <= %{version}
Url:            http://www.riverbankcomputing.co.uk/pykde/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        PyKDE-%{version}.tar.bz2
Patch0:         python-kde3-private-fix.patch
%py_requires

%description
Needed libraries for writing applications in Python for Qt and KDE.



Authors:
--------
    The KDE Team <kde@kde.org>

%package doc
License:        LGPL v2.1 or later
Summary:        Python Bindings for KDE
Group:          Development/Libraries/Python
Requires:       python-kde3 = %{version}

%description doc
Needed libraries for writing applications in Python for Qt and KDE.



Authors:
--------
    The KDE Team <kde@kde.org>

%package examples
License:        LGPL v2.1 or later
Summary:        Python Bindings for KDE
Group:          Development/Libraries/Python
Requires:       python-kde3 = %{version}

%description examples
Needed libraries for writing applications in Python for Qt and KDE.



Authors:
--------
    The KDE Team <kde@kde.org>

%prep
%setup -q -n PyKDE-%{version}
# sip 4.14 removed ANY define
%patch0 -p1
sed -i 's/sipFree((ANY /sipFree((void /g' sip/*/*.sip

%build
sed -i 's|extra_cxxflags=None|extra_cxxflags="-fpermissive"|g' configure.py
sed -i 's|extra_cflags=None|extra_cflags="-fpermissive"|g' configure.py

python configure.py -i -u
#sed -i 's|KFile::SelectionMode selectionMode() const|KFile::SelectionMode KFileView::selectionMode() const|g' kfile/sipkfileKFileIconView.cpp
sed -i 's|virtual void clear()|virtual void KFileView::clear()|g' kfile/sipkfileKFileIconView.cpp
make %{?jobs:-j %jobs}
# create symlinks to the sip dir in order to allow 
# the debug packages to locate the sip files
for d in sip/*; do
    d=$(basename $d)
    [ -d "$d" ] || continue
    ln -s ../sip $d/sip
done

%install
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog README THANKS
/usr/bin/kdepyuic
%{py_sitedir}/dcop.so
%{py_sitedir}/dcopexport.py
%{py_sitedir}/dcopext.py
%{py_sitedir}/kabc.so
%{py_sitedir}/kdecore.so
%{py_sitedir}/kdefx.so
%{py_sitedir}/kdeprint.so
%{py_sitedir}/kdeui.so
%{py_sitedir}/kfile.so
%{py_sitedir}/khtml.so
%{py_sitedir}/kio.so
%{py_sitedir}/kmdi.so
%{py_sitedir}/kparts.so
%{py_sitedir}/kresources.so
%{py_sitedir}/kspell.so
%{py_sitedir}/kutils.so
%{py_sitedir}/pykdeconfig.py
%{_datadir}/sip/dcop/
%{_datadir}/sip/kabc
%{_datadir}/sip/kdecore
%{_datadir}/sip/kdefx
%{_datadir}/sip/kdeprint
%{_datadir}/sip/kdeui
%{_datadir}/sip/kfile
%{_datadir}/sip/khtml
%{_datadir}/sip/kio
%{_datadir}/sip/kmdi
%{_datadir}/sip/kparts
%{_datadir}/sip/kresources
%{_datadir}/sip/kspell
%{_datadir}/sip/kutils

%files doc
%defattr(-,root,root)
%doc doc/*

%files examples
%defattr(-,root,root)
%doc examples/*

%changelog
* Sat Dec 06 2008 dmueller@suse.de
- update to 3.16.2:
  * fixes build against SIP 4.7.9
* Mon Jan 28 2008 dmueller@suse.de
- fix python requires
* Sun Aug 19 2007 ro@suse.de
- fix requires for doc and examples package
* Sun Aug 19 2007 ro@suse.de
- added provides obsoletes for kdebindings3-python
- use "-i" to compile individual files
  "-c" will take over 5 hours
* Fri Aug 17 2007 dmueller@suse.de
- build Python KDE3 bindings separately (#300041)
openSUSE Build Service is sponsored by