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