File python-qt4.spec of Package python-qt4
#
# spec file for package python-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: python-qt4
BuildRequires: libqt4-devel python-devel python-sip-devel
BuildRequires: libQtWebKit-devel
BuildRequires: fdupes
BuildRequires: dbus-1-python-devel
Requires: dbus-1-python >= %( echo `rpm -q --queryformat '%{VERSION}' dbus-1-python`)
%if 0%{?suse_version} >= 1130
BuildRequires: phonon-devel
%endif
%if %sles_version == 10
Requires: python-elementtree
%endif
Requires: python-sip >= %( echo `rpm -q --queryformat '%{VERSION}' python-sip`)
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-python.diff
Patch2: disable-rpaths.diff
Patch3: build-compare.diff
%py_requires
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif
Requires: libqt4-x11 >= %( echo `rpm -q --queryformat '%{VERSION}' 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 python-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
%package utils
Summary: Common files for PyQt4 for python2 and python3
License: GPLv2, GPLv3 or Riverbank Commercial License
Group: Development/Libraries/Python
%description utils
This package is needed to avoid conflicts between python-qt4 and
python3-qt4 packages. It contains files common to both of them i.e.
sip files used to generate bindings and utilities pylupdate4 and pyrcc4
%prep
%setup -q -n PyQt-x11-gpl-%{rversion}
%patch0 -p1
%patch2
%patch3
%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
python configure.py --confirm-license --qsci-api -u
make %{_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT INSTALL_ROOT=$RPM_BUILD_ROOT install
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 %{py_sitedir}/PyQt4
%{py_sitedir}/PyQt4/__init__.*
%{py_sitedir}/PyQt4/*.so
%{py_sitedir}/PyQt4/uic
%{python_sitelib}/dbus/mainloop/qt.so
%if %sles_version == 10
%{py_sitedir}/PyQt4/elementtree/__init__.py
%{py_sitedir}/PyQt4/elementtree/ElementTree.py
%{py_sitedir}/PyQt4/elementtree/ElementPath.py
%endif
%files devel
%defattr(-,root,root)
/usr/share/doc/packages/python-qt4-devel
/usr/bin/pyuic4
%{py_sitedir}/PyQt4/pyqtconfig.py
%dir /usr/share/qt4/qsci
%dir /usr/share/qt4/qsci/api
%dir /usr/share/qt4/qsci/api/python
/usr/share/qt4/qsci/api/python/PyQt4.api
/usr/%{_lib}/qt4/plugins/designer/libpythonplugin.so
%files utils
%defattr(-,root,root)
/usr/bin/pylupdate4
/usr/bin/pyrcc4
/usr/share/sip/PyQt4
%changelog