x86_64, aarch64: install dbus/mainloop/qt.so under %python_sitearch

build only py3 version with obsoletes [release 4.12.3-5mamba;Sat Mar 27 2021]
This commit is contained in:
Silvan Calarco 2024-01-05 17:52:19 +01:00
parent 281186b94f
commit fc4d087b56

View File

@ -2,13 +2,13 @@
Name: PyQt4 Name: PyQt4
Version: 4.12.3 Version: 4.12.3
Release: 4mamba Release: 5mamba
Summary: Python bindings for the Qt cross platform GUI toolkit Summary: Python bindings for the Qt cross platform GUI toolkit
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.riverbankcomputing.com/software/pyqt URL: https://www.riverbankcomputing.com/software/pyqt
Source: https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%{version}/PyQt4_gpl_x11-%{version}.tar.gz Source: https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%{version}/PyQt4_gpl_x11-%{version}.tar.gz
Patch0: %{name}-egl.patch Patch0: %{name}-egl.patch
Patch1: %{name}-4.7.3-qreal_float_support.patch Patch1: %{name}-4.7.3-qreal_float_support.patch
@ -23,75 +23,55 @@ BuildRequires: libX11-devel
BuildRequires: libXext-devel BuildRequires: libXext-devel
BuildRequires: libdbus-devel BuildRequires: libdbus-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libphonon-devel BuildRequires: libphonon4-devel
BuildRequires: libpython-devel BuildRequires: libpython3-devel
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
BuildRequires: libstdc++6-devel BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libpython3-devel >= 3.7.4 BuildRequires: libpython3-devel >= 3.7.4
BuildRequires: sip4
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: libXcursor-devel BuildRequires: libXcursor-devel
BuildRequires: python-dbus-py3 BuildRequires: python-dbus-py3
BuildRequires: python-dbus-devel BuildRequires: python-dbus-devel
# WARNING: do not parametrize python-sip-devel version or it will be useless for ports
%ifnarch aarch64
BuildRequires: python-sip4 >= 4.19.22
BuildRequires: python-sip4-py36 >= 4.19.22
%endif
BuildRequires: python-sip4-py3 >= 4.19.22 BuildRequires: python-sip4-py3 >= 4.19.22
#Requires: python-sip4 = %{pythonsip_ver}
Requires: python-dbus
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
PyQt4 is a comprehensive set of Python bindings for Qt4 cross platform GUI toolkit. PyQt4 is a comprehensive set of Python bindings for Qt4 cross platform GUI toolkit.
%if "%?with_pyver"
%define pyver %{with_pyver}
%define __python %(rpm --eval %{__python%{with_pyver}})
%define python_sitearch %(rpm --eval %{python%{with_pyver}_sitearch})
%define python_sitelib %(rpm --eval %{python%{with_pyver}_sitelib})
%define python_inc %(rpm --eval %{python%{with_pyver}_inc})
%define python_version %(rpm --eval %{python%{with_pyver}_version})
%define python_provides %(rpm --eval %{python%{with_pyver}_provides})
%define python_requires %(rpm --eval %{python%{with_pyver}_requires})
%define py_requires %(rpm --eval %{py%{with_pyver}_requires})
%package py%{pyver}
Group: System/Libraries/Python
Summary: Python %{pyver} bindings for the Qt cross platform GUI toolkit
#Requires: python-sip4%{?with_pyver:-py%{pyver}} = %{pythonsip_ver}
Requires: python-dbus%{?with_pyver:-py%{pyver}}
%py_requires
%description py%{pyver}
PyQt4 is a comprehensive set of Python bindings for Qt4 cross platform GUI toolkit.
%endif
%package devel %package devel
Summary: Development files for PyQt4 Summary: Development files for PyQt4
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}%{?with_pyver:-py%{pyver}} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name}-py3 = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}%{?with_pyver:-py%{pyver}}-QtDesigner = %{?epoch:%epoch:}%{version}-%{release}
%description devel %description devel
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit. PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
This package contains files needed for development. This package contains files needed for development.
%if 0%{?with_pyver}
%define py_requires_append \
Requires: python-dbus%{?with_pyver:-py%{pyver}} \
Provides: PyQt4 \
Obsoletes: PyQt4 <= 4.12.3-4mamba
Obsoletes: PyQt4-py36 <= 4.12.3-4mamba
%pyver_package
%endif
%package %{?with_pyver:py%{pyver}-}QtDesigner %package %{?with_pyver:py%{pyver}-}QtDesigner
Summary: QtDesigner support components for PyQt4 Summary: QtDesigner support components for PyQt4
Group: System/Libraries Group: System/Libraries
Requires: %{name}%{?with_pyver:-py%{pyver}} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name}%{?with_pyver:-py%{pyver}} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: PyQt4-QtDesigner <= 4.12.3-4mamba
Obsoletes: PyQt4-py36-QtDesigner <= 4.12.3-4mamba
%description %{?with_pyver:py%{pyver}-}QtDesigner %description %{?with_pyver:py%{pyver}-}QtDesigner
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit. PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
This package contains the QtDesigner support components for PyQt4. This package contains the QtDesigner support components for PyQt4.
%prep %prep
%setup -q -n PyQt4_gpl_x11-%{version} -D -T %setup -q -n PyQt4_gpl_x11-%{version}
%build %build
:<< _EOF
sed -i "/generate_code(\"phonon\")/s:phonon\":&, extra_include_dirs=[\"%{_includedir}/phonon\"]:" configure.py sed -i "/generate_code(\"phonon\")/s:phonon\":&, extra_include_dirs=[\"%{_includedir}/phonon\"]:" configure.py
%{__python} configure.py CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" \ %{__python} configure.py CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" \
@ -125,7 +105,8 @@ find examples/ -type f -exec chmod 0644 {} ';'
%files %{?with_pyver:py%{pyver}} %files %{?with_pyver:py%{pyver}}
%defattr(-,root,root) %defattr(-,root,root)
%{python_sitelib}/dbus/mainloop/qt.so %{python_sitearch}/dbus/mainloop/qt.so
%dir %{python_sitearch}/PyQt4
%{python_sitearch}/PyQt4/Qt.so %{python_sitearch}/PyQt4/Qt.so
%{python_sitearch}/PyQt4/QtAssistant.so %{python_sitearch}/PyQt4/QtAssistant.so
%{python_sitearch}/PyQt4/QtCore.so %{python_sitearch}/PyQt4/QtCore.so
@ -144,8 +125,8 @@ find examples/ -type f -exec chmod 0644 {} ';'
%{python_sitearch}/PyQt4/QtXml.so %{python_sitearch}/PyQt4/QtXml.so
%{python_sitearch}/PyQt4/QtXmlPatterns.so %{python_sitearch}/PyQt4/QtXmlPatterns.so
%{python_sitearch}/PyQt4/__init__.py %{python_sitearch}/PyQt4/__init__.py
%ifnarch aarch64
%{python_sitearch}/PyQt4/phonon.so %{python_sitearch}/PyQt4/phonon.so
%ifnarch aarch64
%{python_sitearch}/PyQt4/QtWebKit.so %{python_sitearch}/PyQt4/QtWebKit.so
%endif %endif
%{python_sitearch}/PyQt4/pyqtconfig.py %{python_sitearch}/PyQt4/pyqtconfig.py
@ -171,6 +152,10 @@ find examples/ -type f -exec chmod 0644 {} ';'
%{_qt4_plugindir}/designer/* %{_qt4_plugindir}/designer/*
%changelog %changelog
* Sat Mar 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.12.3-5mamba
- x86_64, aarch64: install dbus/mainloop/qt.so under %python_sitearch
- build only py3 version with obsoletes
* Fri Apr 10 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.12.3-4mamba * Fri Apr 10 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.12.3-4mamba
- rebuilt with python-sip4 - rebuilt with python-sip4