]>
Commit | Line | Data |
---|---|---|
1 | # NOTE: not splitting WebKit/WebKitWidgets, interdependencies are not clear | |
2 | # (e.g. WebProcess requires WebKitWidgets) | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with bootstrap # disable features to able to build without installed qt5 | |
6 | # -- build targets | |
7 | %bcond_without doc # documentation | |
8 | # -- features | |
9 | %bcond_with qtmultimedia # QtMultimedia support (instead of GStreamer) | |
10 | %bcond_with seccomp # WebProcess seccomp filters (broken as of 5.212.0-alpha4) | |
11 | ||
12 | %if %{with bootstrap} | |
13 | %undefine with_doc | |
14 | %endif | |
15 | ||
16 | # it's not possible to build this with debuginfo on 32bit archs due to | |
17 | # memory constraints during linking | |
18 | %ifarch %{ix86} x32 | |
19 | %define _enable_debug_packages 0 | |
20 | %endif | |
21 | ||
22 | %define snap alpha4 | |
23 | %define rel 1 | |
24 | ||
25 | %define orgname qtwebkit | |
26 | %define qtbase_ver 5.11 | |
27 | %define qtdeclarative_ver 5.11 | |
28 | %define qtlocation_ver 5.11 | |
29 | %define qtmultimedia_ver 5.11 | |
30 | %define qtsensors_ver 5.11 | |
31 | %define qttools_ver 5.11 | |
32 | %define qtwebchannel_ver 5.11 | |
33 | Summary: The Qt5 WebKit libraries | |
34 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit | |
35 | Name: qt5-%{orgname} | |
36 | Version: 5.212.0 | |
37 | Release: 0.%{snap}.%{rel} | |
38 | License: LGPL v2+ | |
39 | Group: X11/Libraries | |
40 | #Source0Download: https://github.com/qtwebkit/qtwebkit/releases | |
41 | Source0: https://github.com/qtwebkit/qtwebkit/releases/download/qtwebkit-%{version}-%{snap}/qtwebkit-%{version}-%{snap}.tar.xz | |
42 | # Source0-md5: 5b61a72497f06e51db09d57edc3c35fb | |
43 | Patch0: %{name}-css.patch | |
44 | Patch1: %{name}-docs.patch | |
45 | # from FC | |
46 | Patch102: qtwebkit-5.212.0_cmake_cmp0071.patch | |
47 | Patch108: x32.patch | |
48 | URL: https://github.com/annulen/webkit | |
49 | BuildRequires: OpenGL-devel | |
50 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
51 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
52 | %{?with_qtmultimedia:BuildRequires: Qt5MultimediaWidgets-devel >= %{qtmultimedia_ver}} | |
53 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
54 | BuildRequires: Qt5OpenGL-devel >= %{qtbase_ver} | |
55 | BuildRequires: Qt5Positioning-devel >= %{qtlocation_ver} | |
56 | BuildRequires: Qt5PrintSupport-devel >= %{qtbase_ver} | |
57 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
58 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
59 | BuildRequires: Qt5Sensors-devel >= %{qtsensors_ver} | |
60 | BuildRequires: Qt5WebChannel-devel >= %{qtwebchannel_ver} | |
61 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
62 | BuildRequires: bison >= 2.1 | |
63 | BuildRequires: dwz >= 0.13 | |
64 | BuildRequires: glib2-devel >= 1:2.36 | |
65 | BuildRequires: gperf >= 3.0.1 | |
66 | BuildRequires: gstreamer-devel >= 1.0.3 | |
67 | BuildRequires: gstreamer-gl-devel >= 1.6.0 | |
68 | BuildRequires: gstreamer-plugins-bad-devel >= 1.4.0 | |
69 | BuildRequires: gstreamer-plugins-base-devel >= 1.0.3 | |
70 | BuildRequires: hyphen-devel | |
71 | BuildRequires: libicu-devel | |
72 | BuildRequires: libjpeg-devel | |
73 | BuildRequires: libpng-devel | |
74 | %{?with_seccomp:BuildRequires: libseccomp-devel} | |
75 | BuildRequires: libwebp-devel | |
76 | BuildRequires: libxml2-devel >= 1:2.8.0 | |
77 | BuildRequires: libxslt-devel >= 1.1.7 | |
78 | BuildRequires: perl-base >= 1:5.10.0 | |
79 | BuildRequires: pkgconfig | |
80 | BuildRequires: python >= 1:2.7.0 | |
81 | BuildRequires: ruby >= 1:1.9 | |
82 | %if %{with doc} | |
83 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
84 | %endif | |
85 | BuildRequires: qt5-build >= %{qtbase_ver} | |
86 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
87 | BuildRequires: rpmbuild(macros) >= 1.752 | |
88 | BuildRequires: sqlite3-devel >= 3 | |
89 | BuildRequires: tar >= 1:1.22 | |
90 | BuildRequires: woff2-devel >= 1.0.1 | |
91 | BuildRequires: xorg-lib-libX11-devel | |
92 | BuildRequires: xorg-lib-libXcomposite-devel | |
93 | BuildRequires: xorg-lib-libXrender-devel | |
94 | BuildRequires: xz | |
95 | BuildRequires: zlib-devel | |
96 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
97 | ||
98 | %define specflags -fno-strict-aliasing | |
99 | %define qt5dir %{_libdir}/qt5 | |
100 | ||
101 | %description | |
102 | Qt is a cross-platform application and UI framework. Using Qt, you can | |
103 | write web-enabled applications once and deploy them across desktop, | |
104 | mobile and embedded systems without rewriting the source code. | |
105 | ||
106 | This package contains Qt5 WebKit libraries. | |
107 | ||
108 | %description -l pl.UTF-8 | |
109 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
110 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
111 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
112 | źródłowego. | |
113 | ||
114 | Ten pakiet zawiera biblioteki Qt5 WebKit. | |
115 | ||
116 | %package -n Qt5WebKit | |
117 | Summary: The Qt5 WebKit libraries | |
118 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit | |
119 | Group: X11/Libraries | |
120 | Requires: Qt5Core >= %{qtbase_ver} | |
121 | Requires: Qt5Gui >= %{qtbase_ver} | |
122 | %{?with_qtmultimedia:Requires: Qt5MultimediaWidgets >= %{qtmultimedia_ver}} | |
123 | Requires: Qt5Network >= %{qtbase_ver} | |
124 | Requires: Qt5OpenGL >= %{qtbase_ver} | |
125 | Requires: Qt5Positioning >= %{qtlocation_ver} | |
126 | Requires: Qt5PrintSupport >= %{qtbase_ver} | |
127 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
128 | Requires: Qt5Quick >= %{qtdeclarative_ver} | |
129 | Requires: Qt5Sensors >= %{qtsensors_ver} | |
130 | Requires: Qt5Sql >= %{qtbase_ver} | |
131 | Requires: Qt5Widgets >= %{qtbase_ver} | |
132 | ||
133 | %description -n Qt5WebKit | |
134 | Qt5 WebKit libraries provide a web browser engine as well as C++ | |
135 | classes to render and interact with web content. | |
136 | ||
137 | %description -n Qt5WebKit -l pl.UTF-8 | |
138 | Biblioteki Qt5 WebKit dostarczają silnik przeglądarki WWW, a także | |
139 | klasy C++ do renderowania i interakcji z treścią WWW. | |
140 | ||
141 | %package -n Qt5WebKit-devel | |
142 | Summary: Qt5 WebKit libraries - development files | |
143 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit - pliki programistyczne | |
144 | Group: X11/Development/Libraries | |
145 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
146 | Requires: Qt5Gui-devel >= %{qtbase_ver} | |
147 | %{?with_qtmultimedia:Requires: Qt5MultimediaWidgets-devel >= %{qtmultimedia_ver}} | |
148 | Requires: Qt5Network-devel >= %{qtbase_ver} | |
149 | Requires: Qt5OpenGL-devel >= %{qtbase_ver} | |
150 | Requires: Qt5Positioning-devel >= %{qtlocation_ver} | |
151 | Requires: Qt5PrintSupport-devel >= %{qtbase_ver} | |
152 | Requires: Qt5Quick-devel >= %{qtbase_ver} | |
153 | Requires: Qt5Sensors-devel >= %{qtsensors_ver} | |
154 | Requires: Qt5WebKit = %{version}-%{release} | |
155 | Requires: Qt5Widgets-devel >= %{qtbase_ver} | |
156 | ||
157 | %description -n Qt5WebKit-devel | |
158 | Qt5 WebKit libraries - development files. | |
159 | ||
160 | %description -n Qt5WebKit-devel -l pl.UTF-8 | |
161 | Biblioteki Qt5 WebKit - pliki programistyczne. | |
162 | ||
163 | %package doc | |
164 | Summary: Qt5 WebKit documentation in HTML format | |
165 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 WebKit w formacie HTML | |
166 | Group: Documentation | |
167 | Requires: qt5-doc-common >= %{qtbase_ver} | |
168 | %{?noarchpackage} | |
169 | ||
170 | %description doc | |
171 | Qt5 WebKit documentation in HTML format. | |
172 | ||
173 | %description doc -l pl.UTF-8 | |
174 | Dokumentacja do bibliotek Qt5 WebKit w formacie HTML. | |
175 | ||
176 | %package doc-qch | |
177 | Summary: Qt5 WebKit documentation in QCH format | |
178 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 WebKit w formacie QCH | |
179 | Group: Documentation | |
180 | Requires: qt5-doc-common >= %{qtbase_ver} | |
181 | %{?noarchpackage} | |
182 | ||
183 | %description doc-qch | |
184 | Qt5 WebKit documentation in QCH format. | |
185 | ||
186 | %description doc-qch -l pl.UTF-8 | |
187 | Dokumentacja do bibliotek Qt5 WebKit w formacie QCH. | |
188 | ||
189 | %prep | |
190 | %setup -q -n qtwebkit-%{version}-%{snap} | |
191 | %patch0 -p1 | |
192 | %patch1 -p1 | |
193 | %patch102 -p1 | |
194 | %patch108 -p1 | |
195 | ||
196 | %build | |
197 | mkdir -p build | |
198 | cd build | |
199 | CFLAGS="%{rpmcflags}"; export CFLAGS | |
200 | CXXFLAGS="%{rpmcxxflags} -fpermissive"; export CXXFLAGS | |
201 | # We cannot use default cmake macro here as it overwrites some settings queried | |
202 | # by qtwebkit cmake from qmake | |
203 | cmake \ | |
204 | -DPORT=Qt \ | |
205 | -DCMAKE_BUILD_TYPE=Release \ | |
206 | -DENABLE_NETSCAPE_PLUGIN_API=ON \ | |
207 | %{?with_seccomp:-DENABLE_SECCOMP_FILTERS=ON} \ | |
208 | -DENABLE_TOOLS=OFF \ | |
209 | -DENABLE_X11_TARGET=ON \ | |
210 | -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \ | |
211 | -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \ | |
212 | -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
213 | %{?with_qtmultimedia:-DUSE_GSTREAMER:BOOL=OFF -DUSE_QT_MULTIMEDIA:BOOL=ON} \ | |
214 | %{?with_doc:-DGENERATE_DOCUMENTATION=ON} \ | |
215 | %if "%{_lib}" == "lib64" | |
216 | -DLIB_SUFFIX=64 \ | |
217 | %endif | |
218 | %if "%{_lib}" == "libx32" | |
219 | -DLIB_SUFFIX=x32 \ | |
220 | %endif | |
221 | %ifarch x32 | |
222 | -DENABLE_JIT=OFF \ | |
223 | %endif | |
224 | .. | |
225 | ||
226 | %{__make} | |
227 | ||
228 | %install | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %{__make} -C build install \ | |
232 | DESTDIR=$RPM_BUILD_ROOT | |
233 | ||
234 | # normalize paths | |
235 | %{__sed} -i -e '/^Libs:/ s,-L/[^ ]*,-L%{_libdir},' \ | |
236 | -e '/^Cflags:/ s,-I[^ ]*/include/qt5,-I%{_includedir}/qt5,' \ | |
237 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc | |
238 | ||
239 | %clean | |
240 | rm -rf $RPM_BUILD_ROOT | |
241 | ||
242 | %post -n Qt5WebKit -p /sbin/ldconfig | |
243 | %postun -n Qt5WebKit -p /sbin/ldconfig | |
244 | ||
245 | %files -n Qt5WebKit | |
246 | %defattr(644,root,root,755) | |
247 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so.*.*.* | |
248 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKit.so.5 | |
249 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so.*.*.* | |
250 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKitWidgets.so.5 | |
251 | %dir %{_libdir}/qt5/qml/QtWebKit | |
252 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/libqmlwebkitplugin.so | |
253 | %{_libdir}/qt5/qml/QtWebKit/plugins.qmltypes | |
254 | %{_libdir}/qt5/qml/QtWebKit/qmldir | |
255 | %dir %{_libdir}/qt5/qml/QtWebKit/experimental | |
256 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.so | |
257 | %{_libdir}/qt5/qml/QtWebKit/experimental/qmldir | |
258 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebProcess | |
259 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebNetworkProcess | |
260 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebPluginProcess | |
261 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebStorageProcess | |
262 | ||
263 | %files -n Qt5WebKit-devel | |
264 | %defattr(644,root,root,755) | |
265 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so | |
266 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so | |
267 | %{_includedir}/qt5/QtWebKit | |
268 | %{_includedir}/qt5/QtWebKitWidgets | |
269 | %{_pkgconfigdir}/Qt5WebKit.pc | |
270 | %{_pkgconfigdir}/Qt5WebKitWidgets.pc | |
271 | %{_libdir}/cmake/Qt5WebKit | |
272 | %{_libdir}/cmake/Qt5WebKitWidgets | |
273 | %{qt5dir}/mkspecs/modules/qt_lib_webkit.pri | |
274 | %{qt5dir}/mkspecs/modules/qt_lib_webkit_private.pri | |
275 | %{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets.pri | |
276 | %{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets_private.pri | |
277 | ||
278 | %if %{with doc} | |
279 | %files doc | |
280 | %defattr(644,root,root,755) | |
281 | %{_docdir}/qt5-doc/qtwebkit | |
282 | ||
283 | %files doc-qch | |
284 | %defattr(644,root,root,755) | |
285 | %{_docdir}/qt5-doc/qtwebkit.qch | |
286 | %endif |