1 |
# eu-strip crashes on chrome binary from this build |
2 |
%define _enable_debug_packages 0 |
3 |
%global debug_package %{nil} |
4 |
%global __debug_install_post %{nil} |
5 |
|
6 |
%global use_clang 0 |
7 |
%global system_icu 1 |
8 |
%global system_openjpeg 1 |
9 |
%global system_libtiff 1 |
10 |
%global system_libvpx 1 |
11 |
%global system_dav1d 1 |
12 |
%global system_re2 1 |
13 |
%global system_fontconfig 1 |
14 |
# system libevent causes the renderer to get stuck |
15 |
%global system_libevent 0 |
16 |
|
17 |
%if %{system_icu} |
18 |
%define gn_icu icu |
19 |
%endif |
20 |
%if %{system_libvpx} |
21 |
%define gn_libvpx libvpx |
22 |
%endif |
23 |
%if %{system_dav1d} |
24 |
%define gn_dav1d dav1d |
25 |
%endif |
26 |
%if %{system_re2} |
27 |
%define gn_re2 re2 |
28 |
%endif |
29 |
%if %{system_fontconfig} |
30 |
%define gn_fontconfig fontconfig |
31 |
%endif |
32 |
%if %{system_libevent} |
33 |
%define gn_libevent libevent |
34 |
%endif |
35 |
%if %{use_clang} |
36 |
%define gn_clang is_clang=true |
37 |
%else |
38 |
%define gn_clang is_clang=false |
39 |
%endif |
40 |
|
41 |
%define crname chromium-browser |
42 |
%define _crdir %{_libdir}/%{crname} |
43 |
%define __requires_exclude_from ^%{_crdir}/libwidevinecdmadapter.so$ |
44 |
|
45 |
# eol 'fix' corrupts some .bin |
46 |
%define dont_fix_eol 1 |
47 |
|
48 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
49 |
# Note: these are for Mageia use ONLY. |
50 |
# For your own builds, please get your own set of keys. |
51 |
%define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU |
52 |
%define google_default_client_id 1039996407057-q599ngv7i6ni4sbkd2fsns30246r9s9v.apps.googleusercontent.com |
53 |
%define google_default_client_secret mRHXPjlS4cLpp1beCiXoYbLZ |
54 |
|
55 |
Name: chromium-browser-stable |
56 |
Version: 87.0.4280.141 |
57 |
Release: %mkrel 2 |
58 |
Summary: A fast webkit-based web browser |
59 |
Group: Networking/WWW |
60 |
License: BSD, LGPL |
61 |
URL: http://www.chromium.org/Home |
62 |
# http://omahaproxy.appspot.com/ |
63 |
# http://googlechromereleases.blogspot.com/ |
64 |
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz |
65 |
Source1: chromium-wrapper |
66 |
Source2: chromium-browser.desktop |
67 |
Source3: pkg_resources.tar.gz |
68 |
# from gentoo: compiler setup |
69 |
Patch1: chromium-compiler-r4.patch |
70 |
# fix googleisms in man page |
71 |
Patch2: chromium-mageia.patch |
72 |
# (ns80) use a patch rather than a source file for widevine |
73 |
Patch3: chromium-71.0.3578.98-widevine-r3.patch |
74 |
# (ns80) remove unrar |
75 |
Patch4: chromium-norar.patch |
76 |
# (cjw) Recognize mimetypes for matroska (.mkv) and AVI (.avi) formats (video/x-matroska and audio/x-matroska, video/x-msvideo) + handle A52 "AC3" and DTS compressed audio. |
77 |
Patch6: chromium-55-extra-media.patch |
78 |
# (cjw) [1/2] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos |
79 |
Patch7: chromium-40-wmvflvmpg.patch |
80 |
# (cjw) [2/2] Handle more video codecs. |
81 |
Patch8: chromium-40-sorenson-spark.patch |
82 |
# (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example |
83 |
Patch10: chromium-45-no-external-components.patch |
84 |
# (debian) disable third party cookies by default |
85 |
Patch11: chromium-third-party-cookies-off-by-default.patch |
86 |
# (cjw) fix build error due to android-specific code |
87 |
Patch19: chromium-50-codec-warnings.patch |
88 |
# (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs" |
89 |
Patch22: chromium-54-proprietary-codecs-assert.patch |
90 |
# (cjw) disable werror for a compilation warning that causes the build to fail |
91 |
Patch23: chromium-53-bignum-werror-fix.patch |
92 |
# (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail |
93 |
Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch |
94 |
# (cjw) link several libraries directly instead of loading them using dlopen() |
95 |
Patch27: chromium-53-link-libgio-libpci-libudev-libbrlapi.patch |
96 |
# (cjw) add missing unbundle gn files (1) |
97 |
Patch28: chromium-53-gn-system-icu-jsoncpp.patch |
98 |
# (cjw) add missing unbundle gn files (2) |
99 |
Patch29: chromium-53-gn-system-opus.patch |
100 |
%if %{system_libtiff} |
101 |
# (cjw) build pdfium with system libtiff |
102 |
Patch30: chromium-52-pdfium-system-libtiff-libpng.patch |
103 |
%endif |
104 |
%if %{system_openjpeg} |
105 |
# (cjw) fix pdfium build with system openjpeg |
106 |
Patch31: chromium-74-pdfium-system-libopenjpeg2.patch |
107 |
%endif |
108 |
# (cjw) fix build with current glib... |
109 |
Patch36: chromium-58-glib.patch |
110 |
# (cjw) use system nodejs to fix build |
111 |
Patch37: chromium-58-system-nodejs.patch |
112 |
# (cjw) redefined macro |
113 |
Patch40: chromium-59-gcc5.patch |
114 |
# (cjw) system libvpx |
115 |
Patch42: chromium-60-system-libvpx.patch |
116 |
# (cjw) fix coding errors resulting in gcc 7 warning |
117 |
Patch54: chromium-62-gcc7.patch |
118 |
# (cjw) fix gcc errors and warnings |
119 |
Patch177: chromium-64-gcc7.patch |
120 |
# (cjw) fix even more gcc warnings |
121 |
Patch179: chromium-65-gcc7.patch |
122 |
# (cjw) fix yet mmore gcc warnings |
123 |
Patch182: chromium-66-gcc7.patch |
124 |
# (cjw) fix a few more gcc warnings |
125 |
Patch184: chromium-67-gcc7.patch |
126 |
# (cjw) more gcc warnings |
127 |
Patch186: chromium-68-gcc7.patch |
128 |
# (cjw) moore gcc warnings |
129 |
Patch188: chromium-68-gcc8.patch |
130 |
# (cjw) and more gcc warnings |
131 |
Patch189: chromium-69-gcc7.patch |
132 |
# (cjw) fix gn bootstrapping with gcc |
133 |
Patch190: chromium-69-gn-bootstrap.patch |
134 |
# (cjw) moooore gcc warnings |
135 |
Patch192: chromium-70-gcc8.patch |
136 |
# (cjw) build fixes for 64-bit arm |
137 |
Patch193: chromium-70-aarch64.patch |
138 |
# (cjw) gn bootstrap fix |
139 |
Patch195: chromium-72-gn-bootstrap.patch |
140 |
# (cjw) yet more gcc warnings |
141 |
Patch196: chromium-72-gcc8.patch |
142 |
# (cjw) use system closure compiler |
143 |
Patch197: chromium-72-system-closure-compiler.patch |
144 |
# (cjw) fix i586 build |
145 |
Patch198: chromium-72-i586.patch |
146 |
# (cjw) some more gcc warnings |
147 |
Patch199: chromium-73-gcc8.patch |
148 |
# (cjw) gcc warnings |
149 |
Patch200: chromium-74-gcc8.patch |
150 |
# (cjw) gcc warnings |
151 |
Patch201: chromium-75-gcc8.patch |
152 |
# (cjw) fixes for gcc warnings that do not work with clang |
153 |
%if !%{use_clang} |
154 |
Patch203: chromium-75-gcc-only.patch |
155 |
%endif |
156 |
# (cjw) gcc warnings |
157 |
Patch205: chromium-76-gcc8.patch |
158 |
# (cjw) gcc warnings |
159 |
Patch207: chromium-77-gcc9.patch |
160 |
# (cjw) fix build with system icu |
161 |
Patch209: chromium-77-system-icu.patch |
162 |
# (cjw) fixes for gcc warnings that do not work with clang |
163 |
%if !%{use_clang} |
164 |
Patch211: chromium-77-gcc-only.patch |
165 |
%endif |
166 |
# (cjw) force use of python2, since python3 does not work |
167 |
Patch215: chromium-77-python2.patch |
168 |
# (cjw) gcc warnings |
169 |
Patch216: chromium-78-gcc.patch |
170 |
# (cjw) gcc warnings |
171 |
Patch220: chromium-79-gcc.patch |
172 |
%if !%{use_clang} |
173 |
# fixes for gcc warnings that do not work with clang |
174 |
Patch221: chromium-79-gcc-only.patch |
175 |
%endif |
176 |
# (cjw) support using system dav1d |
177 |
Patch224: chromium-79-system-dav1d.patch |
178 |
# (cjw) gcc warnings |
179 |
Patch226: chromium-80-gcc.patch |
180 |
%if !%{use_clang} |
181 |
# fixes for gcc warnings that do not work with clang |
182 |
Patch230: chromium-80-gcc-only.patch |
183 |
%endif |
184 |
# (cjw) gcc warnings |
185 |
Patch231: chromium-81-gcc.patch |
186 |
# (cjw) gcc warnings |
187 |
Patch232: chromium-83-gcc.patch |
188 |
# (cjw) upstream gcc build fix, via gentoo |
189 |
Patch234: chromium-83-gcc-iterator.patch |
190 |
# (cjw) gcc warnings |
191 |
Patch237: chromium-84-gcc.patch |
192 |
# (cjw) fix build with system zlib |
193 |
Patch240: chromium-85-system-zlib.patch |
194 |
# (cjw) gcc warnings |
195 |
Patch241: chromium-85-gcc.patch |
196 |
# (cjw) fix angle-vulkan build with system zlib |
197 |
Patch243: chromium-87-system-zlib.patch |
198 |
# (cjw) gcc errors and warnings |
199 |
Patch244: chromium-87-gcc.patch |
200 |
# (cjw) workarounds for gcc warnings that do not work with clang |
201 |
Patch245: chromium-87-gcc-only.patch |
202 |
# crash fix from upstream |
203 |
Patch246: chromium-87-double-free.patch |
204 |
# (cjw) fix occurrences of TRUE that icu headers do not define anymore |
205 |
Patch247: chromium-87-system-icu.patch |
206 |
|
207 |
Provides: %{crname} |
208 |
Obsoletes: chromium-browser-unstable < 26.0.1410.51 |
209 |
Obsoletes: chromium-browser-beta < 26.0.1410.51 |
210 |
Obsoletes: chromium-browser < 1:9.0.597.94 |
211 |
BuildRequires: bison |
212 |
BuildRequires: flex |
213 |
BuildRequires: gperf |
214 |
%if %{system_icu} |
215 |
BuildRequires: icu |
216 |
%endif |
217 |
BuildRequires: ninja |
218 |
BuildRequires: python2 |
219 |
BuildRequires: yasm |
220 |
BuildRequires: bzip2-devel |
221 |
#BuildRequires: closure-compiler |
222 |
BuildRequires: cups-devel |
223 |
BuildRequires: elfutils-devel |
224 |
BuildRequires: ffmpeg-devel |
225 |
BuildRequires: glib2-devel |
226 |
BuildRequires: gtk3-devel |
227 |
BuildRequires: libatomic-devel |
228 |
%if %{system_libevent} |
229 |
BuildRequires: libevent-devel |
230 |
%endif |
231 |
BuildRequires: libmesagl-devel |
232 |
BuildRequires: libpam-devel |
233 |
BuildRequires: libpulseaudio-devel |
234 |
BuildRequires: mesaglesv2-devel |
235 |
%if %mgaver >= 6 |
236 |
BuildRequires: nodejs |
237 |
%endif |
238 |
BuildRequires: osmesa-devel |
239 |
#BuildRequires: protobuf-devel |
240 |
BuildRequires: snappy-devel |
241 |
BuildRequires: perl(Switch) |
242 |
BuildRequires: pkgconfig(alsa) |
243 |
BuildRequires: pkgconfig(atk) |
244 |
%if %{system_dav1d} |
245 |
BuildRequires: pkgconfig(dav1d) |
246 |
%endif |
247 |
BuildRequires: pkgconfig(dbus-glib-1) |
248 |
BuildRequires: pkgconfig(expat) |
249 |
BuildRequires: pkgconfig(flac) |
250 |
%if %{system_fontconfig} |
251 |
BuildRequires: pkgconfig(fontconfig) |
252 |
%endif |
253 |
BuildRequires: pkgconfig(freetype2) |
254 |
BuildRequires: pkgconfig(gbm) |
255 |
BuildRequires: pkgconfig(glu) |
256 |
BuildRequires: pkgconfig(gnome-keyring-1) |
257 |
BuildRequires: pkgconfig(gnutls) |
258 |
%if %mgaver >= 7 |
259 |
BuildRequires: pkgconfig(harfbuzz) |
260 |
%endif |
261 |
%if %{system_icu} |
262 |
BuildRequires: pkgconfig(icu-i18n) |
263 |
%endif |
264 |
BuildRequires: pkgconfig(jsoncpp) |
265 |
BuildRequires: pkgconfig(libcap) |
266 |
BuildRequires: pkgconfig(libdrm) |
267 |
BuildRequires: pkgconfig(libexif) |
268 |
BuildRequires: pkgconfig(libjpeg) |
269 |
BuildRequires: pkgconfig(libopenjp2) |
270 |
BuildRequires: pkgconfig(libpci) |
271 |
BuildRequires: pkgconfig(libpng) |
272 |
%if %{system_libtiff} |
273 |
BuildRequires: pkgconfig(libtiff-4) |
274 |
%endif |
275 |
BuildRequires: pkgconfig(libusb-1.0) |
276 |
%if %{system_libvpx} |
277 |
BuildRequires: pkgconfig(libvpx) |
278 |
%endif |
279 |
BuildRequires: pkgconfig(libwebp) |
280 |
BuildRequires: pkgconfig(libxml-2.0) |
281 |
BuildRequires: pkgconfig(libxslt) |
282 |
BuildRequires: pkgconfig(minizip) |
283 |
BuildRequires: pkgconfig(nspr) |
284 |
BuildRequires: pkgconfig(nss) |
285 |
BuildRequires: pkgconfig(opus) |
286 |
%if %{system_re2} |
287 |
BuildRequires: pkgconfig(re2) |
288 |
%endif |
289 |
BuildRequires: pkgconfig(speech-dispatcher) |
290 |
BuildRequires: pkgconfig(speex) |
291 |
BuildRequires: pkgconfig(udev) |
292 |
BuildRequires: pkgconfig(xscrnsaver) |
293 |
BuildRequires: pkgconfig(xt) |
294 |
BuildRequires: pkgconfig(xtst) |
295 |
BuildRequires: pkgconfig(zlib) |
296 |
%if %{use_clang} |
297 |
BuildRequires: clang |
298 |
%endif |
299 |
|
300 |
# Unused but building gn wants it to be present |
301 |
BuildRequires: pkgconfig(gconf-2.0) |
302 |
BuildRequires: git |
303 |
ExclusiveArch: i586 x86_64 |
304 |
# aarch64 does not build without fewer than default parallel jobs config |
305 |
# armv5tl armv7hl |
306 |
|
307 |
%description |
308 |
Chromium is a browser that combines a minimal design with sophisticated |
309 |
technology to make the web faster, safer, and easier. |
310 |
|
311 |
For certain media playback features - AAC decoding - this package |
312 |
currently assumes decoder support is available, while that is only true if |
313 |
the 'tainted' variety of the libavcodec package is installed. When the 'core' |
314 |
variety of libavcodec is installed, chromium may output noise for AAC audio. |
315 |
|
316 |
%ifarch %{ix86} |
317 |
The i586 build of this package does not work on machines that do not |
318 |
support the SSE2 instruction set extension. |
319 |
%endif |
320 |
|
321 |
%package -n chromium-browser |
322 |
Summary: A fast webkit-based web browser (transition package) |
323 |
Epoch: 1 |
324 |
Group: Networking/WWW |
325 |
Requires: %{name} = %{version}-%{release} |
326 |
|
327 |
%description -n chromium-browser |
328 |
Chromium is a browser that combines a minimal design with sophisticated |
329 |
technology to make the web faster, safer, and easier. |
330 |
|
331 |
This is a transition package that installs the stable channel Chromium |
332 |
browser. |
333 |
|
334 |
%prep |
335 |
%setup -q -n chromium-%{version} |
336 |
%autopatch -p1 |
337 |
|
338 |
# files we do not want from upstream source bundles |
339 |
rm -r --interactive=never third_party/breakpad/breakpad/src/processor/testdata/ |
340 |
rm -r --interactive=never third_party/breakpad/breakpad/src/tools |
341 |
find chrome/common/extensions/docs/ -type f \! -regex '.*\.\(gn\|gni\)' -delete |
342 |
rm -r --interactive=never chrome/test/data/{android,app_shim,apptest,ash,autofill,automation,automation_proxy_snapshot,banners,bookmark_html_reader,bookmarks,captive_portal,chromedriver,chrome_endure,chromeos,click_modifier,components,constrained_files,content,content_setting_bubble,devtools,diagnostics,dom_automation,dom_checker,dom_distiller,downloads,drive_first_run,dromaeo,durable,edge_database_reader,edge_profile,encoding_tests,extensions,fast_shutdown,fast_tab_close,favicon,feeds,file_select_helper,find_in_page,firefox320_profile,firefox35_profile,firefox3_nss,firefox3_nss_mac,firefox3_profile,firefox_profile,firefox_searchplugins,focus,frame_dom_access,frame_tree,ftp,fullscreen_mouselock,geolocation,google,gpu,History,image_decoding,image_search,import,indexeddb,inspector,installer,interstitial_page,login,native_messaging,navigation_interception,notifications,page_cycler,page_load_metrics,password,pepper,perf,permissions,plugin_power_saver,policy,popup_blocker,predictor,prefs,pref_service,prerender,printing,profiles,push_messaging,referrer_policy,safe_browsing,save_page,scroll,session_history,session_restore,sessions,settings,speech,ssl,subresource_filter,sunspider,sync,template_url_scraper,textinput,third_party,top_sites,translate,unit,v8_benchmark_v6,viewsource,web_app_info,webrtc,websocket,webui_test_resources.grd,whitelists,workers} |
343 |
rm -r --interactive=never chrome/test/data/nacl/{pnacl_error_handling,cross_origin,irt_exception,pnacl_request_header,nonsfi,pnacl_url_loader,pnacl_hw_eh_disabled,pnacl_nmf_options,pnacl_dyncode_syscall_disabled,extension_mime_handler,ppapi_test_lib,bad,ppapi,manifest,pnacl_debug_url,extension_validation_cache,exit_status,progress_events,manifest_file,sysconf_nprocessors_onln,crash,pnacl_mime_type} |
344 |
rmdir chrome/test/data/webui/{settings,extensions}/a11y |
345 |
rmdir chrome/test/data/webui/settings/chromeos/app_management |
346 |
rmdir chrome/test/data/webui/{engagement,extensions,history,net_internals} |
347 |
rm -r --interactive=never components/test/data/update_client/jebgalgnebhfojomionfpkfelancnnkf/component1.dll |
348 |
rm -r --interactive=never content/test/data/ |
349 |
rm -r --interactive=never ppapi/native_client/tests/ |
350 |
rm -r --interactive=never third_party/apache-win32/ |
351 |
rm -r --interactive=never third_party/expat/{fuzz,include,src} |
352 |
rm -r --interactive=never third_party/ffmpeg/*/* |
353 |
rm -r --interactive=never third_party/flac/{include,src} |
354 |
%if %{system_icu} |
355 |
rm -r --interactive=never third_party/icu/{android,android_small,common,patches,source,chromeos,ios} |
356 |
%endif |
357 |
rm -r --interactive=never third_party/jsoncpp/source |
358 |
rm -r --interactive=never third_party/lcov |
359 |
%if %{system_libevent} |
360 |
rm -r --interactive=never base/third_party/libevent/*/* |
361 |
rm -r --interactive=never base/third_party/libevent/*.[ch] |
362 |
%endif |
363 |
%if %{system_libvpx} |
364 |
rm -r --interactive=never third_party/libvpx/source/{libvpx,config} |
365 |
%endif |
366 |
rm -r --interactive=never third_party/libaom/source |
367 |
%if %{system_dav1d} |
368 |
rm -r --interactive=never third_party/dav1d/{libdav1d,version} |
369 |
%endif |
370 |
rm -r --interactive=never third_party/libjpeg_turbo/*.[ch] |
371 |
rm -r --interactive=never third_party/libpng/*.[ch] |
372 |
rm -r --interactive=never third_party/libxslt/{linux,mac,src,win32} |
373 |
rm -r --interactive=never third_party/xdg-utils/tests/ |
374 |
rm -r --interactive=never third_party/zlib/{*.[ch],contrib/minizip} |
375 |
rm -r --interactive=never native_client_sdk/src/tools/lib/tests/data |
376 |
rm -r --interactive=never buildtools/third_party/eu-strip/bin |
377 |
rm --interactive=never third_party/pdfium/third_party/libopenjpeg20/*.[ch] |
378 |
rm -r --interactive=never third_party/pdfium/third_party/libpng16 |
379 |
%if %{system_libtiff} |
380 |
rm --interactive=never third_party/pdfium/third_party/libtiff/*.[ch] |
381 |
%endif |
382 |
%if %{system_re2} |
383 |
rm -r --interactive=never third_party/re2/src |
384 |
%endif |
385 |
%if %{system_fontconfig} |
386 |
rm -r --interactive=never third_party/fontconfig/{src,include,chromium} |
387 |
%endif |
388 |
rm --interactive=never native_client/tools/redirector.exe |
389 |
rm --interactive=never third_party/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe |
390 |
rm -r --interactive=never third_party/llvm |
391 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-Gerbera.exe |
392 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-PVRSDK.exe |
393 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/libGLES_CM.dll |
394 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/bob/bob |
395 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/glut/SanOGLES |
396 |
rm --interactive=never third_party/lzma_sdk/Executable/7za.exe |
397 |
rm --interactive=never third_party/lzma_sdk/7zr.exe |
398 |
rm --interactive=never third_party/breakpad/symupload.exe |
399 |
rm -r --interactive=never third_party/catapult/third_party/google-endpoints/setuptools |
400 |
rm -r --interactive=never third_party/catapult/third_party/vinn/third_party/v8 |
401 |
rm --interactive=never third_party/depot_tools/ninja.exe |
402 |
rm --interactive=never third_party/depot_tools/ninja-linux32 |
403 |
rm --interactive=never third_party/depot_tools/ninja-linux64 |
404 |
rm -r --interactive=never native_client/tools/hermetic_cygwin |
405 |
rm -r --interactive=never base/test/data/pe_image/ |
406 |
rm -r --interactive=never base/test/data/file_version_info_unittest |
407 |
rm -r --interactive=never chrome/chrome_cleaner/test/resources/signed_dll |
408 |
rm --interactive=never third_party/crashpad/crashpad/handler/win/z7_test.dll |
409 |
rm -r --interactive=never third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus |
410 |
rm -r --interactive=never third_party/boringssl/src/util/ar/testdata |
411 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_unittests |
412 |
rm -r --interactive=never third_party/pyelftools/test/external_tools |
413 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_readelf |
414 |
rm -r --interactive=never third_party/pyelftools/examples |
415 |
rm -r --interactive=never third_party/skia/platform_tools/android/bin |
416 |
rm --interactive=never third_party/nasm/travis/test/tmap.o.t |
417 |
rm -r --interactive=never components/test/data/update_client |
418 |
rm -r --interactive=never build/android/tests/symbolize |
419 |
|
420 |
rm --interactive=never third_party/skia/platform_tools/android/apps/gradle/wrapper/gradle-wrapper.jar |
421 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
422 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
423 |
rm -r --interactive=never third_party/libphonenumber/dist/java/demo/war/WEB-INF/lib |
424 |
rm -r --interactive=never third_party/libphonenumber/dist/java/lib |
425 |
rm --interactive=never third_party/webrtc/examples/androidapp/third_party/autobanh/lib/autobanh.jar |
426 |
rm --interactive=never third_party/closure_compiler/compiler/compiler.jar |
427 |
rm --interactive=never third_party/flatbuffers/src/android/gradle/wrapper/gradle-wrapper.jar |
428 |
rm --interactive=never third_party/flatbuffers/src/samples/android/gradle/wrapper/gradle-wrapper.jar |
429 |
rm --interactive=never third_party/devtools-frontend/src/scripts/closure/compiler.jar |
430 |
rm --interactive=never third_party/devtools-frontend/src/scripts/closure/closure_runner/closure_runner.jar |
431 |
rm --interactive=never third_party/devtools-frontend/src/scripts/jsdoc_validator/jsdoc_validator.jar |
432 |
rm --interactive=never third_party/gradle_wrapper/gradle/wrapper/gradle-wrapper.jar |
433 |
rm --interactive=never third_party/webgl/src/conformance-suites/2.0.0/deqp/compiler.jar |
434 |
|
435 |
%if %{system_libevent} |
436 |
find base/third_party/libevent -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
437 |
%endif |
438 |
|
439 |
%if %{system_icu} |
440 |
# Remove bundled ICU; its header files appear to get picked up instead of |
441 |
# the system ones, leading to errors during the final link stage. |
442 |
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q |
443 |
find third_party/icu -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
444 |
%endif |
445 |
|
446 |
# Hard code extra version |
447 |
FILE=chrome/common/channel_info_posix.cc |
448 |
sed -i.orig -re 's/char\s*\*(.*)getenv\("CHROME_VERSION_EXTRA"\)/char const *\1"%{product_vendor} %{product_version}"/' $FILE |
449 |
if diff -u $FILE $FILE.orig >/dev/null; then |
450 |
exit 1 |
451 |
fi |
452 |
|
453 |
# version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1 " (version:" |
454 |
#define widevine_version 1.4.8.1008 |
455 |
#for chrome_arch in ia32 x64; do |
456 |
# mkdir -p third_party/widevine/cdm/linux/${chrome_arch} |
457 |
# sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h |
458 |
#done |
459 |
|
460 |
%build |
461 |
%define system_gn_list ffmpeg flac %{?gn_fontconfig} libwebp libxml libxslt snappy %{?gn_libvpx} libpng %{?gn_icu} zlib jsoncpp opus %{?gn_re2} libdrm %{?gn_dav1d} %{?gn_libevent} |
462 |
# handled by upstream regular build scripts: freetype harfbuzz-ng |
463 |
# mesa |
464 |
|
465 |
# v NO TABS IN HERE! |
466 |
%define gn_config use_sysroot=false \ |
467 |
system_libdir="%{_lib}" \ |
468 |
icu_use_data_file=true \ |
469 |
enable_nacl=false \ |
470 |
is_nacl_glibc=false \ |
471 |
linux_use_bundled_binutils=false \ |
472 |
custom_toolchain="//build/toolchain/linux/unbundle:default" \ |
473 |
host_toolchain="//build/toolchain/linux/unbundle:default" \ |
474 |
proprietary_codecs=true \ |
475 |
linux_link_libudev = true \ |
476 |
linux_link_libspeechd = true \ |
477 |
enable_platform_ac3_eac3_audio = true \ |
478 |
enable_mse_mpeg2ts_stream_parser=true \ |
479 |
enable_platform_hevc=true \ |
480 |
use_system_libjpeg=true \ |
481 |
use_system_libopenjpeg2=true \ |
482 |
use_libjpeg_turbo=false \ |
483 |
enable_widevine=true \ |
484 |
pdf_enable_xfa=true \ |
485 |
gtk_version=3 \ |
486 |
fatal_linker_warnings=false \ |
487 |
use_libpci = true \ |
488 |
use_pulseaudio=true \ |
489 |
use_allocator="none" \ |
490 |
is_debug=false \ |
491 |
%{?gn_clang} \ |
492 |
clang_use_chrome_plugins=false \ |
493 |
use_lld=false \ |
494 |
use_gold=false \ |
495 |
use_system_freetype=true \ |
496 |
use_system_harfbuzz=true \ |
497 |
use_system_libpng=true \ |
498 |
enable_dav1d_decoder=true enable_libaom_decoder=false \ |
499 |
use_custom_libcxx=false \ |
500 |
closure_compile=false \ |
501 |
enable_mojom_closure_compile=false \ |
502 |
enable_js_type_check=false \ |
503 |
google_api_key="%{google_api_key}" \ |
504 |
google_default_client_id="%{google_default_client_id}" \ |
505 |
google_default_client_secret="%{google_default_client_secret}" |
506 |
|
507 |
|
508 |
# enable_browser_cdms=true \ |
509 |
|
510 |
build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list} |
511 |
third_party/libaddressinput/chromium/tools/update-strings.py |
512 |
|
513 |
%set_build_flags |
514 |
%if %{use_clang} |
515 |
CC=clang; export CC |
516 |
CXX=clang++; export CXX |
517 |
%else |
518 |
CC=%{__cc}; export CC |
519 |
CXX=%{__cxx}; export CXX |
520 |
%endif |
521 |
AR=%{__ar}; export AR |
522 |
NM=%{__nm}; export NM |
523 |
LD="%{__cxx} -fuse-ld=gold"; export LD |
524 |
|
525 |
# filter out -g from CFLAGS and CXXFLAGS to fix builds |
526 |
CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //') |
527 |
CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //') |
528 |
CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes" |
529 |
%if %{use_clang} |
530 |
CFLAGS="$CFLAGS -Wno-error=unused-result" |
531 |
CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-declarations" |
532 |
%else |
533 |
CXXFLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-error=unknown-pragmas -Wno-error=array-bounds" |
534 |
%endif |
535 |
%ifarch %ix86 |
536 |
LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped" |
537 |
%endif |
538 |
|
539 |
%ifarch %{ix86} |
540 |
CFLAGS="$CFLAGS -msse2" |
541 |
CXXFLAGS="$CXXFLAGS -msse2" |
542 |
%endif |
543 |
|
544 |
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' |
545 |
|
546 |
out/Release/gn gen --script-executable=/usr/bin/python2 --args='%{gn_config}' out/Release |
547 |
|
548 |
# python... |
549 |
mkdir out/Release/python2_root |
550 |
cp -r %{python3_sitelib}/xcbgen out/Release/python2_root/ |
551 |
cp -r %{python3_sitelib}/setuptools out/Release/python2_root/ |
552 |
pushd out/Release/python2_root/ |
553 |
tar xf %{SOURCE3} |
554 |
popd |
555 |
|
556 |
# ld.bfd needs lots of file descriptors to link chrome |
557 |
ulimit -n 4096 |
558 |
pushd out/Release |
559 |
env PYTHONPATH=${PWD}/python2_root ninja %{_smp_mflags} chrome chrome_sandbox |
560 |
popd |
561 |
|
562 |
# man page |
563 |
sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1 |
564 |
|
565 |
%install |
566 |
ls out/Release |
567 |
mkdir -p %{buildroot}%{_bindir} |
568 |
mkdir -p %{buildroot}%{_crdir}/locales |
569 |
mkdir -p %{buildroot}%{_crdir}/themes |
570 |
mkdir -p %{buildroot}%{_mandir}/man1 |
571 |
install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ |
572 |
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ |
573 |
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox |
574 |
install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1 |
575 |
install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/ |
576 |
install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/ |
577 |
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/ |
578 |
install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/ |
579 |
install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/ |
580 |
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ |
581 |
install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/ |
582 |
install -m 755 out/Release/libEGL.so %{buildroot}%{_crdir}/ |
583 |
install -m 755 out/Release/libGLESv2.so %{buildroot}%{_crdir}/ |
584 |
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} |
585 |
|
586 |
%ifarch %{ix86} x86_64 |
587 |
mkdir -p %{buildroot}%{_crdir}/swiftshader |
588 |
install -m 755 out/Release/swiftshader/*.so %{buildroot}%{_crdir}/swiftshader/ |
589 |
%endif |
590 |
|
591 |
find out/Release/resources/ -name "*.d" -exec rm {} \; |
592 |
cp -r out/Release/resources %{buildroot}%{_crdir} |
593 |
|
594 |
# desktop file |
595 |
mkdir -p %{buildroot}%{_datadir}/applications |
596 |
install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ |
597 |
|
598 |
%if %{system_icu} |
599 |
# symlink to ICU data file |
600 |
ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/') |
601 |
ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/') |
602 |
ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat) |
603 |
ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat |
604 |
%else |
605 |
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/ |
606 |
%endif |
607 |
|
608 |
# icon |
609 |
for i in 22_mono 24 32 48 64 128 256; do |
610 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
611 |
if [ -f chrome/app/theme/chromium/product_logo_$i.png ]; then |
612 |
install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ |
613 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
614 |
else |
615 |
install -m 644 chrome/app/theme/chromium/linux/product_logo_$i.xpm \ |
616 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.xpm |
617 |
fi |
618 |
done |
619 |
|
620 |
%files -n chromium-browser |
621 |
|
622 |
%files |
623 |
%{_bindir}/%{crname} |
624 |
%dir %{_crdir} |
625 |
%{_crdir}/chromium-wrapper |
626 |
%{_crdir}/chrome |
627 |
%attr(4755,root,root) %{_crdir}/chrome-sandbox |
628 |
%{_crdir}/icudtl.dat |
629 |
%{_crdir}/locales |
630 |
%{_crdir}/snapshot_blob.bin |
631 |
%{_crdir}/resources.pak |
632 |
%{_crdir}/resources |
633 |
%{_crdir}/chrome_100_percent.pak |
634 |
%{_crdir}/chrome_200_percent.pak |
635 |
%{_crdir}/mksnapshot |
636 |
%{_crdir}/themes |
637 |
%{_crdir}/libEGL.so |
638 |
%{_crdir}/libGLESv2.so |
639 |
%ifarch %{ix86} x86_64 |
640 |
%{_crdir}/swiftshader |
641 |
%endif |
642 |
%{_crdir}/v8_context_snapshot.bin |
643 |
%{_mandir}/man1/%{crname}* |
644 |
%{_datadir}/applications/*.desktop |
645 |
%{_iconsdir}/hicolor/*/apps/%{crname}.png |
646 |
%{_iconsdir}/hicolor/*/apps/%{crname}.xpm |