From 2f3668d440e3e00ccb61469ffcf927c1607027e7 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 2 Mar 2016 07:55:57 -0600 Subject: [PATCH] webengine,-webkit subpkgs --- python-qt5.spec | 87 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 16 deletions(-) diff --git a/python-qt5.spec b/python-qt5.spec index f50a6dd..3a1d145 100644 --- a/python-qt5.spec +++ b/python-qt5.spec @@ -6,12 +6,18 @@ %global with_python2 1 %global python2_dbus_dir %(%{__python2} -c "import dbus.mainloop; print(dbus.mainloop.__path__[0])") +# enable/disable individual modules +%if 0%{?fedora} > 23 +%global webengine 1 +%endif +%global webkit 1 + %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Summary: PyQt5 is Python bindings for Qt5 Name: python-qt5 Version: 5.5.1 -Release: 9%{?dist} +Release: 10%{?dist} # all BSD, except for GPLv2+ dbus bindings and examples License: BSD and GPLv2+ @@ -53,11 +59,6 @@ BuildRequires: pkgconfig(Qt5Sql) pkgconfig(Qt5Svg) pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5X11Extras) BuildRequires: pkgconfig(Qt5Xml) pkgconfig(Qt5XmlPatterns) BuildRequires: pkgconfig(Qt5WebChannel) -%if 0%{?fedora} > 23 -%global webengine 1 -BuildRequires: pkgconfig(Qt5WebEngine) -%endif -BuildRequires: pkgconfig(Qt5WebKit) pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt5WebSockets) BuildRequires: python2-devel python2 BuildRequires: sip-devel >= 4.16.9 @@ -67,6 +68,11 @@ BuildRequires: python3-sip-devel >= 4.16.8 BuildRequires: python3-dbus %endif # with_python3 +# when split out +%if 0%{?webengine} || 0%{?webkit} +Obsoletes: python-qt5 < 5.5.1-10 +%endif + Requires: dbus-python %{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}} %{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}} @@ -98,6 +104,10 @@ of the Qt5 classes (e.g. KDE or your own). %package -n python3-qt5 Summary: Python 3 bindings for Qt5 %{?_sip_api:Requires: python3-sip-api(%{_sip_api_major}) >= %{_sip_api}} +# when split out +%if 0%{?webengine} || 0%{?webkit} +Obsoletes: python3-qt5 < 5.5.1-10 +%endif Provides: python3-PyQt5 = %{version}-%{release} Requires: python3-dbus %description -n python3-qt5 @@ -120,6 +130,36 @@ BuildArch: noarch %description doc %{summary}. +%if 0%{?webengine} +%package webengine +Summary: Python bindings for Qt5 WebEngine +BuildRequires: pkgconfig(Qt5WebEngine) +Obsoletes: python-qt5 < 5.5.1-10 +Requires: %{name}%{?_isa} = %{version}-%{release} +%description webkit + +%package -n python3-webengine +Summary: Python bindings for Qt5 WebEngine +Obsoletes: python3-qt5 < 5.5.1-10 +Requires: python3-qt5%{?_isa} = %{version}-%{release} +%description -n python3-webengine +%endif + +%if 0%{?webkit} +%package webkit +Summary: Python bindings for Qt5 Webkit +BuildRequires: pkgconfig(Qt5WebKit) pkgconfig(Qt5WebKitWidgets) +Obsoletes: python-qt5 < 5.5.1-10 +Requires: %{name}%{?_isa} = %{version}-%{release} +%description webkit + +%package -n python3-webkit +Summary: Python bindings for Qt5 Webkit +Obsoletes: python3-qt5 < 5.5.1-10 +Requires: python3-qt5%{?_isa} = %{version}-%{release} +%description -n python3-webkit +%endif + %prep %setup -q -n PyQt-gpl-%{version}%{?snap:-snapshot-%{snap}} @@ -246,11 +286,6 @@ sed -i \ %{python2_sitearch}/PyQt5/QtSvg.so %{python2_sitearch}/PyQt5/QtTest.so %{python2_sitearch}/PyQt5/QtWebChannel.so -%if 0%{?webengine} -%{python2_sitearch}/PyQt5/QtWebEngineWidgets.so -%endif -%{python2_sitearch}/PyQt5/QtWebKit.so -%{python2_sitearch}/PyQt5/QtWebKitWidgets.so %{python2_sitearch}/PyQt5/QtWebSockets.so %{python2_sitearch}/PyQt5/QtWidgets.so %{python2_sitearch}/PyQt5/QtX11Extras.so @@ -262,6 +297,17 @@ sed -i \ %{python2_sitearch}/PyQt5/uic/ %{_qt5_plugindir}/designer/libpyqt5.so +%if 0%{?webengine} +%files webengine +%{python2_sitearch}/PyQt5/QtWebEngineWidgets.so +%endif + +%if 0%{?webkit} +%files webkit +%{python2_sitearch}/PyQt5/QtWebKit.so +%{python2_sitearch}/PyQt5/QtWebKitWidgets.so +%endif + %files devel %{_bindir}/pylupdate5 %{_bindir}/pyrcc5 @@ -303,11 +349,6 @@ sed -i \ %{python3_sitearch}/PyQt5/QtSvg.so %{python3_sitearch}/PyQt5/QtTest.so %{python3_sitearch}/PyQt5/QtWebChannel.so -%if 0%{?webengine} -%{python3_sitearch}/PyQt5/QtWebEngineWidgets.so -%endif -%{python3_sitearch}/PyQt5/QtWebKit.so -%{python3_sitearch}/PyQt5/QtWebKitWidgets.so %{python3_sitearch}/PyQt5/QtWebSockets.so %{python3_sitearch}/PyQt5/QtWidgets.so %{python3_sitearch}/PyQt5/QtX11Extras.so @@ -318,6 +359,17 @@ sed -i \ %{python3_sitearch}/PyQt5/_QOpenGLFunctions_4_1_Core.so %{python3_sitearch}/PyQt5/uic/ +%if 0%{?webengine} +%files -n python3-webengine +%{python3_sitearch}/PyQt5/QtWebEngineWidgets.so +%endif + +%if 0%{?webkit} +%files -n python3-webkit +%{python3_sitearch}/PyQt5/QtWebKit.so +%{python3_sitearch}/PyQt5/QtWebKitWidgets.so +%endif + %files -n python3-qt5-devel %{_bindir}/pylupdate5 %{_bindir}/pyrcc5 @@ -336,6 +388,9 @@ sed -i \ %changelog +* Wed Mar 02 2016 Rex Dieter 5.5.1-10 +- -webengine,-webkit subpkgs + * Sat Feb 27 2016 Christian Dersch - 5.5.1-9 - Enabled QtWebEngine for Fedora >= 24