| 1 | %global with_python3 1 |
|---|
| 2 | %global with_python2 1 |
|---|
| 3 | |
|---|
| 4 | Summary: Python bindings for QtWebEngine |
|---|
| 5 | Name: pyqtwebengine |
|---|
| 6 | Version: 5.12.1 |
|---|
| 7 | Release: 1%{?dist} |
|---|
| 8 | |
|---|
| 9 | Vendor: Project Vine |
|---|
| 10 | Distribution: Vine Linux |
|---|
| 11 | |
|---|
| 12 | License: GPLv3 |
|---|
| 13 | Url: https://www.riverbankcomputing.com/software/pyqt/ |
|---|
| 14 | Source0: https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/%{version}/PyQtWebEngine_gpl-%{version}.tar.gz |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | BuildRequires: gcc-c++ |
|---|
| 18 | BuildRequires: pkgconfig(Qt5WebEngine) |
|---|
| 19 | |
|---|
| 20 | %global sip_ver 4.19.14 |
|---|
| 21 | BuildRequires: qt5-rpm-macros |
|---|
| 22 | %if 0%{?with_python2} |
|---|
| 23 | BuildRequires: python-devel python-rpm-macros python-setuptools |
|---|
| 24 | BuildRequires: python-enum34 |
|---|
| 25 | BuildRequires: python-qt5 |
|---|
| 26 | BuildRequires: python-qt5-base |
|---|
| 27 | BuildRequires: python-qt5-devel |
|---|
| 28 | BuildRequires: sip-devel >= %{sip_ver} |
|---|
| 29 | %endif |
|---|
| 30 | %if 0%{?with_python3} |
|---|
| 31 | BuildRequires: python3-devel python3-rpm-macros python3-setuptools |
|---|
| 32 | BuildRequires: python3-qt5 |
|---|
| 33 | BuildRequires: python3-qt5-base |
|---|
| 34 | BuildRequires: python3-qt5-devel |
|---|
| 35 | BuildRequires: python3-sip-devel >= %{sip_ver} |
|---|
| 36 | %endif # with_python3 |
|---|
| 37 | |
|---|
| 38 | %description |
|---|
| 39 | %{summary}. |
|---|
| 40 | |
|---|
| 41 | %package -n python-qt5-webengine |
|---|
| 42 | Summary: Python bindings for Qt5 WebEngine |
|---|
| 43 | Requires: python-qt5%{?_isa} |
|---|
| 44 | %{?python_provide:%python_provide python-qt5-webengine} |
|---|
| 45 | %description -n python-qt5-webengine |
|---|
| 46 | %{summary}. |
|---|
| 47 | |
|---|
| 48 | %package -n python3-qt5-webengine |
|---|
| 49 | Summary: Python3 bindings for Qt5 WebEngine |
|---|
| 50 | Requires: python3-qt5%{?_isa} |
|---|
| 51 | %{?python_provide:%python_provide python3-qt5-webengine} |
|---|
| 52 | %description -n python3-qt5-webengine |
|---|
| 53 | %{summary}. |
|---|
| 54 | |
|---|
| 55 | %package devel |
|---|
| 56 | Summary: Development files for %{name} |
|---|
| 57 | # when webengine content was split out |
|---|
| 58 | Conflicts: python-qt5-devel < 5.12.1 |
|---|
| 59 | Conflicts: python3-qt5-devel < 5.12.1 |
|---|
| 60 | Requires: sip |
|---|
| 61 | BuildArch: noarch |
|---|
| 62 | %description devel |
|---|
| 63 | %{summary}. |
|---|
| 64 | |
|---|
| 65 | %package doc |
|---|
| 66 | Summary: Developer documentation for %{name} |
|---|
| 67 | BuildArch: noarch |
|---|
| 68 | %description doc |
|---|
| 69 | %{summary}. |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | %prep |
|---|
| 73 | %setup -q -n PyQtWebEngine_gpl-%{version} |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | %build |
|---|
| 77 | PATH=%{_qt5_bindir}:$PATH ; export PATH |
|---|
| 78 | |
|---|
| 79 | # Python 2 build: |
|---|
| 80 | %if 0%{?with_python2} |
|---|
| 81 | mkdir %{_target_platform} |
|---|
| 82 | pushd %{_target_platform} |
|---|
| 83 | %{__python} ../configure.py \ |
|---|
| 84 | --qmake=%{_qt5_qmake} \ |
|---|
| 85 | --verbose \ |
|---|
| 86 | QMAKE_CFLAGS_RELEASE="%{optflags}" \ |
|---|
| 87 | QMAKE_CXXFLAGS_RELEASE="%{optflags}" \ |
|---|
| 88 | QMAKE_LFLAGS_RELEASE="%{?build_ldflags}" |
|---|
| 89 | |
|---|
| 90 | %make_build |
|---|
| 91 | popd |
|---|
| 92 | %endif # with_python2 |
|---|
| 93 | |
|---|
| 94 | # Python 3 build: |
|---|
| 95 | %if 0%{?with_python3} |
|---|
| 96 | mkdir %{_target_platform}-python3 |
|---|
| 97 | pushd %{_target_platform}-python3 |
|---|
| 98 | %{__python3} ../configure.py \ |
|---|
| 99 | --qmake=%{_qt5_qmake} \ |
|---|
| 100 | --verbose \ |
|---|
| 101 | QMAKE_CFLAGS_RELEASE="%{optflags}" \ |
|---|
| 102 | QMAKE_CXXFLAGS_RELEASE="%{optflags}" \ |
|---|
| 103 | QMAKE_LFLAGS_RELEASE="%{?build_ldflags}" |
|---|
| 104 | |
|---|
| 105 | %make_build |
|---|
| 106 | popd |
|---|
| 107 | %endif # with_python3 |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | %install |
|---|
| 111 | rm -rf %{buildroot} |
|---|
| 112 | |
|---|
| 113 | # Python 3 build: |
|---|
| 114 | %if 0%{?with_python3} |
|---|
| 115 | %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-python3 |
|---|
| 116 | |
|---|
| 117 | # ensure .so modules are executable for proper -debuginfo extraction |
|---|
| 118 | for i in %{buildroot}%{python3_sitearch}/PyQt5/*.so ; do |
|---|
| 119 | test -x $i || chmod a+rx $i |
|---|
| 120 | done |
|---|
| 121 | %endif # with_python3 |
|---|
| 122 | |
|---|
| 123 | # Python 2 build: |
|---|
| 124 | %if 0%{?with_python2} |
|---|
| 125 | %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform} |
|---|
| 126 | |
|---|
| 127 | # ensure .so modules are executable for proper -debuginfo extraction |
|---|
| 128 | for i in %{buildroot}%{python_sitearch}/PyQt5/*.so ; do |
|---|
| 129 | test -x $i || chmod a+rx $i |
|---|
| 130 | done |
|---|
| 131 | |
|---|
| 132 | %endif # with_python2 |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | %if 0%{?with_python2} |
|---|
| 136 | %files -n python-qt5-webengine |
|---|
| 137 | %doc README |
|---|
| 138 | %license LICENSE |
|---|
| 139 | %{python_sitearch}/PyQtWebEngine-%{version}.dist-info/ |
|---|
| 140 | %{python_sitearch}/PyQt5/QtWebEngine.* |
|---|
| 141 | %{python_sitearch}/PyQt5/QtWebEngineCore.* |
|---|
| 142 | %{python_sitearch}/PyQt5/QtWebEngineWidgets.* |
|---|
| 143 | %endif |
|---|
| 144 | |
|---|
| 145 | %if 0%{?with_python3} |
|---|
| 146 | %files -n python3-qt5-webengine |
|---|
| 147 | %doc README |
|---|
| 148 | %license LICENSE |
|---|
| 149 | %{python3_sitearch}/PyQtWebEngine-%{version}.dist-info/ |
|---|
| 150 | %{python3_sitearch}/PyQt5/QtWebEngine.* |
|---|
| 151 | %{python3_sitearch}/PyQt5/QtWebEngineCore.* |
|---|
| 152 | %{python3_sitearch}/PyQt5/QtWebEngineWidgets.* |
|---|
| 153 | %endif |
|---|
| 154 | |
|---|
| 155 | %files devel |
|---|
| 156 | %license LICENSE |
|---|
| 157 | %{_datadir}/sip/PyQt5/QtWebEngine*/ |
|---|
| 158 | |
|---|
| 159 | %files doc |
|---|
| 160 | # avoid dep on qscintilla-python, own %%_qt5_datadir/qsci/... here for now |
|---|
| 161 | %dir %{_qt5_datadir}/qsci/ |
|---|
| 162 | %dir %{_qt5_datadir}/qsci/api/ |
|---|
| 163 | %dir %{_qt5_datadir}/qsci/api/python/ |
|---|
| 164 | %doc %{_qt5_datadir}/qsci/api/python/PyQtWebEngine.api |
|---|
| 165 | |
|---|
| 166 | |
|---|
| 167 | %changelog |
|---|
| 168 | * Tue Oct 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 5.12.1-1 |
|---|
| 169 | - initial build for Vine Linux. |
|---|
| 170 | |
|---|
| 171 | * Tue Oct 01 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.13.1-1 |
|---|
| 172 | - 5.13.1 |
|---|
| 173 | |
|---|
| 174 | * Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.12.1-7 |
|---|
| 175 | - Rebuilt for Python 3.8 |
|---|
| 176 | |
|---|
| 177 | * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.12.1-6 |
|---|
| 178 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
|---|
| 179 | |
|---|
| 180 | * Mon Jul 08 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-5 |
|---|
| 181 | - fix/workaround -debug generation |
|---|
| 182 | - +python2 support on f30 |
|---|
| 183 | |
|---|
| 184 | * Thu Apr 11 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-4 |
|---|
| 185 | - -devel: %%license LICENSE |
|---|
| 186 | |
|---|
| 187 | * Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-3 |
|---|
| 188 | - %%doc README |
|---|
| 189 | - %%license LICENSE |
|---|
| 190 | - -devel: Requires: sip |
|---|
| 191 | - use %%autosetup |
|---|
| 192 | |
|---|
| 193 | * Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-2 |
|---|
| 194 | - update Source0 URL |
|---|
| 195 | - use ExclusiveArch |
|---|
| 196 | - use %%build_cflags %%build_cxxflags %%build_ldflags |
|---|
| 197 | - BR: gcc-c++ |
|---|
| 198 | |
|---|
| 199 | * Sat Mar 23 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-1 |
|---|
| 200 | - first try |
|---|
| 201 | |
|---|