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