File python3-qt4.spec of Package python-qt4
#
# spec file for package python3-qt4
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: python3-qt4
License: GPLv2, GPLv3 or Riverbank Commercial License
Group: Development/Libraries/Python
Summary: PyQt - python bindings for Qt 4
Version: 4.8.5
Release: 1
%define rversion %version
Url: http://www.riverbankcomputing.com/software/pyqt/intro
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: PyQt-x11-gpl-%{rversion}.tar.bz2
Patch0: link-python3.diff
Patch2: disable-rpaths.diff
Patch3: build-compare.diff
%if 0%{?suse_version} > 1140
BuildRequires: python3-base
%endif
BuildRequires: libqt4-devel python3-sip-devel
BuildRequires: libQtWebKit-devel
BuildRequires: fdupes
%if 0%{?suse_version} >= 1130
BuildRequires: phonon-devel
%endif
Requires: python3
%if 0%{?suse_version} > 1140
Requires: python3-base
%endif
Requires: python3-sip
Requires: libqt4-x11
%description
PyQt is a set of Python bindings for Trolltech's Qt application
framework and runs on all platforms supported by Qt including Windows,
MacOS/X and Linux. There are two sets of bindings: PyQt v4 supports Qt
v4; and the older PyQt v3 supports Qt v3 and earlier. The bindings are
implemented as a set of Python modules and contain over 300 classes and
nearly 6,000 functions and methods.
Authors:
--------
Riverbank Computing Limited
%package devel
License: GPLv2, GPLv3 or Riverbank Commercial License
Group: Development/Libraries/Python
Summary: PyQt - devel part of python bindings for Qt 4
Requires: libqt4-devel python3-sip-devel python-qt4-utils
Requires: %name = %version
%description devel
PyQt is a set of Python bindings for Trolltech's Qt application
framework and runs on all platforms supported by Qt including Windows,
MacOS/X and Linux. There are two sets of bindings: PyQt v4 supports Qt
v4; and the older PyQt v3 supports Qt v3 and earlier. The bindings are
implemented as a set of Python modules and contain over 300 classes and
nearly 6,000 functions and methods.
This package contains all the developer tools you need to create your
own PyQt applications.
Authors:
--------
Riverbank Computing Limited
%prep
%setup -q -n PyQt-x11-gpl-%{rversion}
%patch0 -p1
%patch2
%patch3
%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
python3 configure.py --confirm-license --qsci-api -u
make %{_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT INSTALL_ROOT=$RPM_BUILD_ROOT install
# pylupdate4 and pyrcc4 are in python-qt4-utils
rm $RPM_BUILD_ROOT/usr/bin/pylupdate4 $RPM_BUILD_ROOT/usr/bin/pyrcc4
rm -rf $RPM_BUILD_ROOT/usr/share/sip/PyQt4
mv $RPM_BUILD_ROOT/usr/bin/pyuic4 $RPM_BUILD_ROOT/usr/bin/py3uic4
mv $RPM_BUILD_ROOT/usr/share/qt4/qsci/api/python $RPM_BUILD_ROOT/usr/share/qt4/qsci/api/python3
mv $RPM_BUILD_ROOT/usr/%{_lib}/qt4/plugins/designer/libpythonplugin.so $RPM_BUILD_ROOT/usr/%{_lib}/qt4/plugins/designer/libpython3plugin.so
sed -i 's/The "doc" directory/The "doc" directory of package %{name}-devel/' README
DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/packages/%{name}-devel
mkdir -p $DOCDIR
cp -pr NEWS THANKS contrib doc examples $DOCDIR
# create hardlinks for duplicate files
%fdupes -s $DOCDIR
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
%dir %{python3_sitearch}/PyQt4
%{python3_sitearch}/PyQt4/__init__.*
%{python3_sitearch}/PyQt4/*.so
%{python3_sitearch}/PyQt4/uic
#{python3_sitearch}/dbus/mainloop/qt.so
%files devel
%defattr(-,root,root)
/usr/share/doc/packages/python3-qt4-devel
/usr/bin/py3uic4
%{python3_sitearch}/PyQt4/pyqtconfig.py
%dir /usr/share/qt4/qsci
%dir /usr/share/qt4/qsci/api
%dir /usr/share/qt4/qsci/api/python3
/usr/share/qt4/qsci/api/python3/PyQt4.api
/usr/%{_lib}/qt4/plugins/designer/libpython3plugin.so
%changelog