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