/[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 1641988 - (show annotations) (download)
Tue Nov 3 10:00:03 2020 UTC (3 years, 5 months ago) by ns80
Original Path: cauldron/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec
File size: 24354 byte(s)
- SILENT: do not build with libvpx and dav1d from system

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

  ViewVC Help
Powered by ViewVC 1.1.30