]>
Commit | Line | Data |
---|---|---|
b7bd06fb JP |
1 | # Conditional build: |
2 | %bcond_without python2 # CPython 2.x modules | |
3 | %bcond_without python3 # CPython 3.x modules | |
4 | ||
5 | %define module PyQtWebEngine | |
6 | # minimal required sip version | |
7 | %define sip_ver 2:4.19.14-1 | |
8 | # last qt version covered by these bindings (minimal required is currently 5.0.0) | |
9 | # %define qt_ver %{version} | |
10 | %define qt_ver 5.12.0 | |
11 | ||
12 | Summary: Python 2 bindings for the Qt5WebEngine module | |
13 | Summary(pl.UTF-8): Wiązania Pythona 2 do modułu Qt5WebEngine | |
14 | Name: python-%{module} | |
fd884756 | 15 | Version: 5.12.1 |
b7bd06fb JP |
16 | Release: 1 |
17 | License: GPL v3 | |
18 | Group: Libraries/Python | |
19 | Source0: https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/PyQtWebEngine_gpl-%{version}.tar.gz | |
fd884756 | 20 | # Source0-md5: 3328d0ccc2649d65846524d70fd0d0c5 |
b7bd06fb JP |
21 | Patch0: install.patch |
22 | URL: http://www.riverbankcomputing.com/software/pyqtwebengine/ | |
23 | BuildRequires: Qt5WebEngine-devel >= %{qt_ver}} | |
24 | BuildRequires: pkgconfig | |
25 | BuildRequires: python-PyQt5-sip >= %{sip_ver} | |
26 | BuildRequires: python-sip-devel >= %{sip_ver} | |
27 | BuildRequires: python3-PyQt5-sip >= %{sip_ver} | |
28 | BuildRequires: python3-sip-devel >= %{sip_ver} | |
29 | BuildRequires: qt5-build >= %{qt_ver} | |
30 | BuildRequires: qt5-qmake >= %{qt_ver} | |
31 | BuildRequires: rpm-pythonprov | |
32 | BuildRequires: rpmbuild(macros) >= 1.219 | |
33 | BuildRequires: sip-PyQt5 >= 5.12 | |
34 | Requires: python-libs | |
35 | Requires: python-PyQt5-sip >= %{sip_ver} | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %define _sipfilesdir %{_datadir}/sip | |
39 | ||
40 | %description | |
41 | Python 2 bindings for the Qt5WebEngine module. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Wiązania Pythona 2 do modułu Qt5WebEngine. | |
45 | ||
46 | %package -n python3-PyQtWebEngine | |
47 | Summary: Python 3 bindings for the Qt5WebEngine module | |
48 | Summary(pl.UTF-8): Wiązania Pythona 2 do modułu Qt5WebEngine | |
49 | Group: Libraries/Python | |
50 | Requires: python3-libs | |
51 | Requires: python3-PyQt5-sip >= %{sip_ver} | |
52 | ||
53 | %description -n python3-PyQtWebEngine | |
54 | Python 3 bindings for the Qt5WebEngine module. | |
55 | ||
56 | %description -n python3-PyQtWebEngine -l pl.UTF-8 | |
57 | Wiązania Pythona 2 do modułu Qt5WebEngine. | |
58 | ||
59 | %package -n sip-PyQtWebEngine | |
60 | Summary: SIP files needed to build bindings for Qt5WebEngine | |
61 | Summary(pl.UTF-8): Pliki SIP potrzebne do budowania wiązań do Qt5WebEngine | |
62 | Group: Development/Languages/Python | |
63 | Requires: sip >= %{sip_ver} | |
64 | ||
65 | %description -n sip-PyQtWebEngine | |
66 | SIP files needed to build bindings for Qt5WebEngine. | |
67 | ||
68 | %description -n sip-PyQtWebEngine -l pl.UTF-8 | |
69 | Pliki SIP potrzebne do budowania wiązań do Qt5WebEngine. | |
70 | ||
71 | %package -n qscintilla2-%{module}-api | |
72 | Summary: PyQtWebEngine API file for QScintilla | |
73 | Summary(pl.UTF-8): Plik API PyQtWebEngine dla QScintilli | |
74 | Group: Libraries/Python | |
75 | Requires: qscintilla2-qt5 >= 2.2-2 | |
76 | ||
77 | %description -n qscintilla2-%{module}-api | |
78 | PyQtWebEngine API file can be used by the QScintilla editor component | |
79 | to enable the use of auto-completion and call tips when editing | |
80 | PyQtWebEngine code. | |
81 | ||
82 | %description -n qscintilla2-%{module}-api -l pl.UTF-8 | |
83 | Plik API PyQtWebEngine może być używany przez komponent edytora | |
84 | QScintilla aby umożliwić automatyczne dopełnianie i podpowiedzi przy | |
85 | modyfikowaniu kodu wykorzystującego PyQtWebEngine. | |
86 | ||
87 | %prep | |
88 | %setup -q -n PyQtWebEngine_gpl-%{version} | |
89 | %patch0 -p1 | |
90 | ||
91 | %build | |
92 | %if %{with python2} | |
93 | install -d build-py2 | |
94 | cd build-py2 | |
95 | %{__python} ../configure.py \ | |
96 | --no-dist-info \ | |
97 | --verbose \ | |
98 | -c -j 3 \ | |
99 | -q "%{_bindir}/qmake-qt5" | |
100 | ||
101 | %{__make} | |
102 | cd .. | |
103 | %endif | |
104 | ||
105 | %if %{with python3} | |
106 | install -d build-py3 | |
107 | cd build-py3 | |
108 | %{__python3} ../configure.py \ | |
109 | --no-dist-info \ | |
110 | --verbose \ | |
111 | -c -j 3 \ | |
112 | -q "%{_bindir}/qmake-qt5" | |
113 | ||
114 | %{__make} | |
115 | cd .. | |
116 | %endif | |
117 | ||
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %if %{with python3} | |
122 | %{__make} -C build-py3 install \ | |
123 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
124 | ||
125 | %endif | |
126 | ||
127 | %if %{with python2} | |
128 | %{__make} -C build-py2 install \ | |
129 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
130 | ||
131 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
132 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
133 | %endif | |
134 | ||
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %if %{with python2} | |
139 | %files | |
140 | %defattr(644,root,root,755) | |
141 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngine.so | |
142 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngineCore.so | |
143 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngineWidgets.so | |
fd884756 JP |
144 | %{py_sitedir}/PyQt5/QtWebEngine.pyi |
145 | %{py_sitedir}/PyQt5/QtWebEngineCore.pyi | |
146 | %{py_sitedir}/PyQt5/QtWebEngineWidgets.pyi | |
b7bd06fb JP |
147 | %endif |
148 | ||
149 | %if %{with python3} | |
150 | %files -n python3-PyQtWebEngine | |
151 | %defattr(644,root,root,755) | |
152 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngine.so | |
153 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngineCore.so | |
154 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngineWidgets.so | |
fd884756 JP |
155 | %{py3_sitedir}/PyQt5/QtWebEngine.pyi |
156 | %{py3_sitedir}/PyQt5/QtWebEngineCore.pyi | |
157 | %{py3_sitedir}/PyQt5/QtWebEngineWidgets.pyi | |
b7bd06fb JP |
158 | %endif |
159 | ||
160 | %files -n sip-PyQtWebEngine | |
161 | %defattr(644,root,root,755) | |
162 | %{_sipfilesdir}/PyQt5/QtWebEngine | |
163 | %{_sipfilesdir}/PyQt5/QtWebEngineCore | |
164 | %{_sipfilesdir}/PyQt5/QtWebEngineWidgets | |
165 | ||
166 | %files -n qscintilla2-%{module}-api | |
167 | %defattr(644,root,root,755) | |
168 | %{_datadir}/qt5/qsci/api/python/PyQtWebEngine.api |