/[packages]/updates/8/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec
ViewVC logotype

Contents of /updates/8/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1642598 - (show annotations) (download)
Wed Nov 4 13:38:11 2020 UTC (3 years, 5 months ago) by ns80
Original Path: cauldron/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec
File size: 24133 byte(s)
- new version 86.0.4240.183 (mga#26648)

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 1
7 %global system_icu 1
8 %global system_openjpeg 1
9 %global system_libtiff 1
10 %global system_libvpx 0
11 %global system_dav1d 0
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: 86.0.4240.183
49 Release: %mkrel 1
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 # fix googleisms in man page
60 Patch2: chromium-mageia.patch
61 # (ns80) use a patch rather than a source file for widevine
62 Patch3: chromium-71.0.3578.98-widevine-r3.patch
63 # (ns80) remove unrar
64 Patch4: chromium-norar.patch
65 # (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.
66 Patch6: chromium-55-extra-media.patch
67 # (cjw) [1/2] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos
68 Patch7: chromium-40-wmvflvmpg.patch
69 # (cjw) [2/2] Handle more video codecs.
70 Patch8: chromium-40-sorenson-spark.patch
71 # (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example
72 Patch10: chromium-45-no-external-components.patch
73 # (debian) disable third party cookies by default
74 Patch11: chromium-third-party-cookies-off-by-default.patch
75 # (cjw) fix build error due to android-specific code
76 Patch19: chromium-50-codec-warnings.patch
77 # (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs"
78 Patch22: chromium-54-proprietary-codecs-assert.patch
79 # (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail
80 Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch
81 # (cjw) add missing unbundle gn files (1)
82 Patch28: chromium-53-gn-system-icu-jsoncpp.patch
83 # (cjw) add missing unbundle gn files (2)
84 Patch29: chromium-53-gn-system-opus.patch
85 %if %{system_openjpeg}
86 # (cjw) fix pdfium build with system openjpeg
87 Patch31: chromium-74-pdfium-system-libopenjpeg2.patch
88 %endif
89 # (cjw) fix build with current glib...
90 Patch36: chromium-58-glib.patch
91 # (cjw) use system nodejs to fix build
92 Patch37: chromium-58-system-nodejs.patch
93 # (cjw) redefined macro
94 Patch40: chromium-59-gcc5.patch
95 # (cjw) system libvpx
96 Patch42: chromium-60-system-libvpx.patch
97 # (cjw) moore gcc warnings
98 Patch188: chromium-68-gcc8.patch
99 # (cjw) fix gn bootstrapping with gcc
100 Patch190: chromium-69-gn-bootstrap.patch
101 # (cjw) build fixes for 64-bit arm
102 Patch193: chromium-70-aarch64.patch
103 # (cjw) gn bootstrap fix
104 Patch195: chromium-72-gn-bootstrap.patch
105 # (cjw) fix i586 build
106 Patch198: chromium-72-i586.patch
107 # (cjw) fix build with system icu
108 Patch209: chromium-77-system-icu.patch
109 %if !%{use_clang}
110 # fixes for gcc warnings that do not work with clang
111 Patch221: chromium-79-gcc-only.patch
112 %endif
113 # (cjw) support using system dav1d
114 Patch224: chromium-79-system-dav1d.patch
115
116 # (ns80) Patches found in fedora, opensuse, gentoo
117 Patch250: chromium-78-protobuf-RepeatedPtrField-export.patch
118 Patch251: chromium-79-gcc-protobuf-alignas.patch
119 Patch252: chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch
120 Patch253: chromium-84-blink-disable-clang-format.patch
121 Patch254: chromium-86-compiler.patch
122 Patch255: chromium-86-ConsumeDurationNumber-constexpr.patch
123 Patch256: chromium-86-ImageMemoryBarrierData-init.patch
124 Patch257: chromium-86-nearby-explicit.patch
125 Patch258: chromium-86-nearby-include.patch
126 Patch259: chromium-86-ServiceWorkerRunningInfo-noexcept.patch
127
128 # (ns80) fixes for building chromium 86
129 Patch300: chromium-86-mga-fix-build.patch
130
131 Provides: %{crname}
132 Obsoletes: chromium-browser-unstable < 26.0.1410.51
133 Obsoletes: chromium-browser-beta < 26.0.1410.51
134 Obsoletes: chromium-browser < 1:9.0.597.94
135 BuildRequires: bison
136 BuildRequires: flex
137 BuildRequires: gperf
138 %if %{system_icu}
139 BuildRequires: icu
140 %endif
141 BuildRequires: java-openjdk-headless
142 BuildRequires: ninja
143 BuildRequires: python2
144 BuildRequires: python3-setuptools
145 BuildRequires: yasm
146 BuildRequires: bzip2-devel
147 BuildRequires: cups-devel
148 BuildRequires: elfutils-devel
149 BuildRequires: ffmpeg-devel
150 BuildRequires: glib2-devel
151 BuildRequires: gtk3-devel
152 BuildRequires: libatomic-devel
153 %if %{system_libevent}
154 BuildRequires: libevent-devel
155 %endif
156 BuildRequires: libmesagl-devel
157 BuildRequires: libpam-devel
158 BuildRequires: libpulseaudio-devel
159 BuildRequires: mesaglesv2-devel
160 %if %mgaver >= 6
161 BuildRequires: nodejs
162 %endif
163 BuildRequires: osmesa-devel
164 BuildRequires: snappy-devel
165 BuildRequires: perl(Switch)
166 BuildRequires: pkgconfig(alsa)
167 BuildRequires: pkgconfig(atk)
168 %if %{system_dav1d}
169 BuildRequires: pkgconfig(dav1d)
170 %endif
171 BuildRequires: pkgconfig(dbus-glib-1)
172 BuildRequires: pkgconfig(expat)
173 BuildRequires: pkgconfig(flac)
174 BuildRequires: pkgconfig(fontconfig)
175 BuildRequires: pkgconfig(freetype2)
176 BuildRequires: pkgconfig(glu)
177 BuildRequires: pkgconfig(gnome-keyring-1)
178 BuildRequires: pkgconfig(gnutls)
179 %if %mgaver >= 7
180 BuildRequires: pkgconfig(harfbuzz)
181 %endif
182 %if %{system_icu}
183 BuildRequires: pkgconfig(icu-i18n)
184 %endif
185 BuildRequires: pkgconfig(jsoncpp)
186 BuildRequires: pkgconfig(libcap)
187 BuildRequires: pkgconfig(libdrm)
188 BuildRequires: pkgconfig(libexif)
189 BuildRequires: pkgconfig(libjpeg)
190 BuildRequires: pkgconfig(libopenjp2)
191 BuildRequires: pkgconfig(libpci)
192 BuildRequires: pkgconfig(libpng)
193 %if %{system_libtiff}
194 BuildRequires: pkgconfig(libtiff-4)
195 %endif
196 BuildRequires: pkgconfig(libusb-1.0)
197 %if %{system_libvpx}
198 BuildRequires: pkgconfig(libvpx)
199 %endif
200 BuildRequires: pkgconfig(libwebp)
201 BuildRequires: pkgconfig(libxml-2.0)
202 BuildRequires: pkgconfig(libxslt)
203 BuildRequires: pkgconfig(minizip)
204 BuildRequires: pkgconfig(nspr)
205 BuildRequires: pkgconfig(nss)
206 BuildRequires: pkgconfig(opus)
207 BuildRequires: pkgconfig(speech-dispatcher)
208 BuildRequires: pkgconfig(speex)
209 BuildRequires: pkgconfig(udev)
210 BuildRequires: pkgconfig(xscrnsaver)
211 BuildRequires: pkgconfig(xt)
212 BuildRequires: pkgconfig(xtst)
213 BuildRequires: pkgconfig(re2)
214 BuildRequires: pkgconfig(gbm)
215 %if %{use_clang}
216 BuildRequires: clang
217 %endif
218
219 # Unused but building gn wants it to be present
220 BuildRequires: pkgconfig(gconf-2.0)
221 BuildRequires: git
222 ExclusiveArch: i586 x86_64
223 # aarch64 does not build without fewer than default parallel jobs config
224 # armv5tl armv7hl
225
226 %description
227 Chromium is a browser that combines a minimal design with sophisticated
228 technology to make the web faster, safer, and easier.
229
230 For certain media playback features - AAC decoding - this package
231 currently assumes decoder support is available, while that is only true if
232 the 'tainted' variety of the libavcodec package is installed. When the 'core'
233 variety of libavcodec is installed, chromium may output noise for AAC audio.
234
235 %ifarch %{ix86}
236 The i586 build of this package does not work on machines that do not
237 support the SSE2 instruction set extension.
238 %endif
239
240 %package -n chromium-browser
241 Summary: A fast webkit-based web browser (transition package)
242 Epoch: 1
243 Group: Networking/WWW
244 Requires: %{name} = %{version}-%{release}
245
246 %description -n chromium-browser
247 Chromium is a browser that combines a minimal design with sophisticated
248 technology to make the web faster, safer, and easier.
249
250 This is a transition package that installs the stable channel Chromium
251 browser.
252
253 %prep
254 %setup -q -n chromium-%{version}
255 %autopatch -p1
256
257 # Remove bundled libs
258 keeplibs=(
259 base/third_party/cityhash
260 base/third_party/double_conversion
261 base/third_party/dynamic_annotations
262 base/third_party/nspr
263 base/third_party/libevent
264 base/third_party/icu
265 base/third_party/superfasthash
266 base/third_party/symbolize
267 base/third_party/valgrind
268 base/third_party/xdg_mime
269 base/third_party/xdg_user_dirs
270 buildtools/third_party/libc++
271 buildtools/third_party/libc++abi
272 buildtools/third_party/libunwind
273 chrome/third_party/mozilla_security_manager
274 courgette/third_party
275 net/third_party/mozilla_security_manager
276 net/third_party/nss
277 net/third_party/quic
278 net/third_party/uri_template
279 third_party/abseil-cpp
280 third_party/angle
281 third_party/angle/src/common/third_party/base
282 third_party/angle/src/common/third_party/smhasher
283 third_party/angle/src/common/third_party/xxhash
284 third_party/angle/src/third_party/compiler
285 third_party/angle/src/third_party/libXNVCtrl
286 third_party/angle/src/third_party/trace_event
287 third_party/angle/src/third_party/volk
288 third_party/angle/third_party/glslang
289 third_party/angle/third_party/spirv-headers
290 third_party/angle/third_party/spirv-tools
291 third_party/angle/third_party/vulkan-headers
292 third_party/angle/third_party/vulkan-loader
293 third_party/angle/third_party/vulkan-tools
294 third_party/angle/third_party/vulkan-validation-layers
295 third_party/apple_apsl
296 third_party/axe-core
297 third_party/blanketjs
298 third_party/blink
299 third_party/boringssl
300 third_party/boringssl/src/third_party/fiat
301 third_party/breakpad
302 third_party/breakpad/breakpad/src/third_party/curl
303 third_party/brotli
304 third_party/catapult
305 third_party/catapult/common/py_vulcanize/third_party/rcssmin
306 third_party/catapult/common/py_vulcanize/third_party/rjsmin
307 third_party/catapult/third_party/beautifulsoup4
308 third_party/catapult/third_party/google-endpoints
309 third_party/catapult/third_party/html5lib-python
310 third_party/catapult/third_party/polymer
311 third_party/catapult/third_party/six
312 third_party/catapult/tracing/third_party/d3
313 third_party/catapult/tracing/third_party/gl-matrix
314 third_party/catapult/tracing/third_party/jpeg-js
315 third_party/catapult/tracing/third_party/jszip
316 third_party/catapult/tracing/third_party/mannwhitneyu
317 third_party/catapult/tracing/third_party/oboe
318 third_party/catapult/tracing/third_party/pako
319 third_party/ced
320 third_party/cld_3
321 third_party/crashpad
322 third_party/closure_compiler
323 third_party/crashpad/crashpad/third_party/lss
324 third_party/crashpad/crashpad/third_party/zlib
325 third_party/crc32c
326 third_party/cros_system_api
327 third_party/dav1d
328 third_party/dawn
329 third_party/depot_tools
330 third_party/depot_tools/third_party/six
331 third_party/devscripts
332 third_party/devtools-frontend
333 third_party/devtools-frontend/src/third_party/axe-core
334 third_party/devtools-frontend/src/third_party/typescript
335 third_party/devtools-frontend/src/front_end/third_party/acorn
336 third_party/devtools-frontend/src/front_end/third_party/chromium
337 third_party/devtools-frontend/src/front_end/third_party/codemirror
338 third_party/devtools-frontend/src/front_end/third_party/fabricjs
339 third_party/devtools-frontend/src/front_end/third_party/i18n
340 third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
341 third_party/devtools-frontend/src/front_end/third_party/lighthouse
342 third_party/devtools-frontend/src/front_end/third_party/lit-html
343 third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
344 third_party/devtools-frontend/src/front_end/third_party/marked
345 third_party/devtools-frontend/src/front_end/third_party/wasmparser
346 third_party/devtools-frontend/src/third_party
347 third_party/dom_distiller_js
348 third_party/emoji-segmenter
349 third_party/expat
350 third_party/ffmpeg
351 third_party/flac
352 third_party/flatbuffers
353 third_party/fontconfig
354 third_party/libgifcodec
355 third_party/glslang
356 third_party/google_input_tools
357 third_party/google_input_tools/third_party/closure_library
358 third_party/google_input_tools/third_party/closure_library/third_party/closure
359 third_party/google_trust_services
360 third_party/googletest
361 third_party/grpc
362 third_party/grpc/src/third_party/nanopb
363 third_party/harfbuzz-ng
364 third_party/harfbuzz-ng/utils
365 third_party/hunspell
366 third_party/iccjpeg
367 third_party/inspector_protocol
368 third_party/jinja2
369 third_party/jsoncpp
370 third_party/jstemplate
371 third_party/khronos
372 third_party/leveldatabase
373 third_party/libXNVCtrl
374 third_party/libaddressinput
375 third_party/libaom
376 third_party/libaom/source/libaom/third_party/vector
377 third_party/libaom/source/libaom/third_party/x86inc
378 third_party/libavif
379 third_party/libdrm
380 third_party/libjingle
381 third_party/libjpeg_turbo
382 third_party/libphonenumber
383 third_party/libsecret
384 third_party/libsrtp
385 third_party/libsync
386 third_party/libudev
387 third_party/libusb
388 third_party/libwebm
389 third_party/libwebp
390 third_party/libxml
391 third_party/libxml/chromium
392 third_party/libxslt
393 third_party/libyuv
394 third_party/lottie
395 third_party/lss
396 third_party/lzma_sdk
397 third_party/mako
398 third_party/markupsafe
399 third_party/mesa
400 third_party/metrics_proto
401 third_party/minigbm
402 third_party/modp_b64
403 third_party/nasm
404 third_party/nearby
405 third_party/node
406 third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
407 third_party/one_euro_filter
408 third_party/opencv
409 third_party/openscreen
410 third_party/openscreen/src/third_party/mozilla
411 third_party/openscreen/src/third_party/tinycbor
412 third_party/opus
413 third_party/ots
414 third_party/pdfium
415 third_party/pdfium/third_party/agg23
416 third_party/pdfium/third_party/base
417 third_party/pdfium/third_party/bigint
418 third_party/pdfium/third_party/eu-strip
419 third_party/pdfium/third_party/freetype
420 third_party/pdfium/third_party/lcms
421 third_party/pdfium/third_party/libopenjpeg20
422 third_party/pdfium/third_party/libpng16
423 third_party/pdfium/third_party/libtiff
424 third_party/pdfium/third_party/skia_shared
425 third_party/perfetto
426 third_party/pffft
427 third_party/ply
428 third_party/polymer
429 third_party/private-join-and-compute
430 third_party/protobuf
431 third_party/protobuf/third_party/six
432 third_party/pyjson5
433 third_party/qcms
434 third_party/rnnoise
435 third_party/s2cellid
436 third_party/schema_org
437 third_party/securemessage
438 third_party/simplejson
439 third_party/sinonjs
440 third_party/skia
441 third_party/skia/third_party/skcms
442 third_party/skia/third_party/vulkan
443 third_party/skia/include/third_party/vulkan/
444 third_party/skia/include/third_party/skcms/
445 third_party/smhasher
446 third_party/snappy
447 third_party/spirv-headers
448 third_party/SPIRV-Tools
449 third_party/sqlite
450 third_party/swiftshader
451 third_party/swiftshader/third_party/astc-encoder
452 third_party/swiftshader/third_party/llvm-10.0
453 third_party/swiftshader/third_party/llvm-subzero
454 third_party/swiftshader/third_party/marl
455 third_party/swiftshader/third_party/subzero
456 third_party/swiftshader/third_party/SPIRV-Headers
457 third_party/tcmalloc
458 third_party/test_fonts
459 third_party/ukey2
460 third_party/usrsctp
461 third_party/vulkan
462 third_party/web-animations-js
463 third_party/webdriver
464 third_party/webrtc
465 third_party/webrtc/common_audio/third_party/ooura
466 third_party/webrtc/common_audio/third_party/spl_sqrt_floor
467 third_party/webrtc/modules/third_party/fft
468 third_party/webrtc/modules/third_party/g711
469 third_party/webrtc/modules/third_party/g722
470 third_party/webrtc/rtc_base/third_party/base64
471 third_party/webrtc/rtc_base/third_party/sigslot
472 third_party/widevine
473 third_party/woff2
474 third_party/wuffs
475 third_party/xcbproto
476 third_party/zxcvbn-cpp
477 third_party/zlib
478 third_party/zlib/google
479 tools/gn/src/base/third_party/icu
480 tools/grit/third_party/six
481 url/third_party/mozilla
482 v8/src/third_party/siphash
483 v8/src/third_party/valgrind
484 v8/src/third_party/utf8-decoder
485 v8/third_party/inspector_protocol
486 v8/third_party/v8
487 v8/third_party/v8/builtins
488 )
489 keeplibs+=(
490 third_party/v4l-utils
491 third_party/wayland
492 third_party/wayland-protocols
493 )
494 %if !%{system_icu}
495 keeplibs+=(
496 third_party/icu
497 )
498 %endif
499 %if !%{system_libvpx}
500 keeplibs+=(
501 third_party/libvpx
502 third_party/libvpx/source/libvpx/third_party/x86inc
503 )
504 %endif
505 # needed due to bugs in GN
506 keeplibs+=(
507 third_party/adobe
508 third_party/speech-dispatcher
509 third_party/usb_ids
510 third_party/xdg-utils
511 )
512 python2 build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove
513
514 # Hard code extra version
515 FILE=chrome/common/channel_info_posix.cc
516 sed -i.orig -re 's/char\s*\*(.*)getenv\("CHROME_VERSION_EXTRA"\)/char const *\1"%{product_vendor} %{product_version}"/' $FILE
517 if diff -u $FILE $FILE.orig >/dev/null; then
518 exit 1
519 fi
520
521 %build
522 %define system_gn_list ffmpeg flac libwebp libxml libxslt snappy %{?gn_libvpx} libpng %{?gn_icu} jsoncpp opus re2 libdrm %{?gn_dav1d} %{?gn_libevent} freetype harfbuzz-ng
523
524 # v NO TABS IN HERE!
525 %define gn_config use_sysroot=false \
526 system_libdir="%{_lib}" \
527 icu_use_data_file=true \
528 enable_nacl=false \
529 is_nacl_glibc=false \
530 binutils_path="%{_bindir}" \
531 linux_use_bundled_binutils=false \
532 custom_toolchain="//build/toolchain/linux/unbundle:default" \
533 host_toolchain="//build/toolchain/linux/unbundle:default" \
534 proprietary_codecs=true \
535 linux_link_libudev = true \
536 linux_link_libspeechd = true \
537 enable_platform_ac3_eac3_audio = true \
538 enable_mse_mpeg2ts_stream_parser=true \
539 enable_platform_hevc=true \
540 use_system_libjpeg=true \
541 use_system_libopenjpeg2=true \
542 use_libjpeg_turbo=false \
543 enable_widevine=true \
544 pdf_enable_xfa=true \
545 gtk_version=3 \
546 fatal_linker_warnings=false \
547 use_libpci = true \
548 use_pulseaudio=true \
549 use_allocator="none" \
550 is_debug=false \
551 %{?gn_clang} \
552 clang_use_chrome_plugins=false \
553 use_lld=false \
554 use_system_freetype=true \
555 use_system_harfbuzz=true \
556 use_system_libpng=true \
557 enable_dav1d_decoder=true enable_libaom_decoder=false \
558 use_custom_libcxx=false \
559 closure_compile=false \
560 google_api_key="%{google_api_key}" \
561 google_default_client_id="%{google_default_client_id}" \
562 google_default_client_secret="%{google_default_client_secret}" \
563 treat_warnings_as_errors=false
564
565
566 # enable_browser_cdms=true \
567
568 build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list}
569 third_party/libaddressinput/chromium/tools/update-strings.py
570
571 %set_build_flags
572 %if %{use_clang}
573 CC=clang; export CC
574 CXX=clang++; export CXX
575 %else
576 CC=%{__cc}; export CC
577 CXX=%{__cxx}; export CXX
578 %endif
579 AR=%{__ar}; export AR
580 NM=%{__nm}; export NM
581 LD="%{__cxx} -fuse-ld=gold"; export LD
582
583 # filter out -g from CFLAGS and CXXFLAGS to fix builds
584 CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //')
585 CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //')
586 CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes"
587 %if %{use_clang}
588 CFLAGS="$CFLAGS -Wno-error=unused-result"
589 CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-declarations"
590 %else
591 CXXFLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-error=unknown-pragmas -Wno-error=array-bounds"
592 %endif
593 %ifarch %ix86
594 LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped"
595 %endif
596
597 %ifarch %{ix86}
598 CFLAGS="$CFLAGS -msse2"
599 CXXFLAGS="$CXXFLAGS -msse2"
600 %endif
601
602 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
603
604 out/Release/gn gen --args='%{gn_config}' out/Release
605
606 pushd out/Release
607 ninja %{_smp_mflags} chrome chrome_sandbox
608 popd
609
610 # man page
611 sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1
612
613 %install
614 ls out/Release
615 mkdir -p %{buildroot}%{_bindir}
616 mkdir -p %{buildroot}%{_crdir}/locales
617 mkdir -p %{buildroot}%{_crdir}/themes
618 mkdir -p %{buildroot}%{_mandir}/man1
619 install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/
620 install -m 755 out/Release/chrome %{buildroot}%{_crdir}/
621 install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox
622 install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1
623 install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/
624 install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/
625 install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
626 install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/
627 install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/
628 install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
629 install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/
630 install -m 755 out/Release/libEGL.so %{buildroot}%{_crdir}/
631 install -m 755 out/Release/libGLESv2.so %{buildroot}%{_crdir}/
632 ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname}
633
634 %ifarch %{ix86} x86_64
635 mkdir -p %{buildroot}%{_crdir}/swiftshader
636 install -m 755 out/Release/swiftshader/*.so %{buildroot}%{_crdir}/swiftshader/
637 %endif
638
639 find out/Release/resources/ -name "*.d" -exec rm {} \;
640 cp -r out/Release/resources %{buildroot}%{_crdir}
641
642 # desktop file
643 mkdir -p %{buildroot}%{_datadir}/applications
644 install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/
645
646 %if %{system_icu}
647 # symlink to ICU data file
648 ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/')
649 ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/')
650 ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat)
651 ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat
652 %else
653 install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
654 %endif
655
656 # icon
657 for i in 22_mono 24 32 48 64 128 256; do
658 mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
659 if [ -f chrome/app/theme/chromium/product_logo_$i.png ]; then
660 install -m 644 chrome/app/theme/chromium/product_logo_$i.png \
661 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png
662 else
663 install -m 644 chrome/app/theme/chromium/linux/product_logo_$i.xpm \
664 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.xpm
665 fi
666 done
667
668 %files -n chromium-browser
669
670 %files
671 %{_bindir}/%{crname}
672 %dir %{_crdir}
673 %{_crdir}/chromium-wrapper
674 %{_crdir}/chrome
675 %attr(4755,root,root) %{_crdir}/chrome-sandbox
676 %{_crdir}/icudtl.dat
677 %{_crdir}/locales
678 %{_crdir}/snapshot_blob.bin
679 %{_crdir}/resources.pak
680 %{_crdir}/resources
681 %{_crdir}/chrome_100_percent.pak
682 %{_crdir}/chrome_200_percent.pak
683 %{_crdir}/mksnapshot
684 %{_crdir}/themes
685 %{_crdir}/libEGL.so
686 %{_crdir}/libGLESv2.so
687 %ifarch %{ix86} x86_64
688 %{_crdir}/swiftshader
689 %endif
690 %{_crdir}/v8_context_snapshot.bin
691 %{_mandir}/man1/%{crname}*
692 %{_datadir}/applications/*.desktop
693 %{_iconsdir}/hicolor/*/apps/%{crname}.png
694 %{_iconsdir}/hicolor/*/apps/%{crname}.xpm

  ViewVC Help
Powered by ViewVC 1.1.30