代码拉取完成,页面将自动刷新
同步操作将从 openEuler-RISC-V/chromium 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%define _lto_cflags %{nil}
%global numjobs 10
%global build_target() \
export NINJA_STATUS="[%2:%f/%t] " ; \
../depot_tools/ninja -j %{numjobs} -C '%1' -vvv '%2'
%global use_jumbo 0
%global build_headless 1
%global build_remoting 1
%global use_vaapi 1
%global use_gold 0
%global build_clear_key_cdm 1
%global shared 0
%global freeworld 0
%if %{freeworld}
%global lsuffix freeworld
%if 0%{?shared}
%global nsuffix -libs-media-freeworld
%else
%global nsuffix -freeworld
%endif
%else
%global lsuffix openEuler
%global nsuffix %{nil}
%endif
%global useapikeys 1
%global builddir out/Release
%global headlessbuilddir out/Headless
%global remotingbuilddir out/Remoting
%global debug_package %{nil}
%global chromium_channel %{nil}
%global chromium_menu_name Chromium
%global chromium_browser_channel chromium-browser%{chromium_channel}
%global chromium_path %{_libdir}/chromium-browser%{chromium_channel}
%global crd_path %{_libdir}/chrome-remote-desktop
%if 0%{?shared}
%global __provides_exclude_from %{chromium_path}/.*\\.so|%{chromium_path}/lib/.*\\.so|%{chromium_path}/lib/.*\\.so.*
%global privlibs libaccessibility|libandroid_mojo_bindings_shared|libanimation|libapdu|libaura|libaura_extra|libauthenticator_test_mojo_bindings_shared|libbase|libbase_i18n|libbindings|libbindings_base|libblink_common|libblink_controller|libblink_core|libblink_embedded_frame_sink_mojo_bindings_shared|libblink_features|libblink_modules|libblink_mojom_broadcastchannel_bindings_shared|libblink_platform|libbluetooth|libboringssl|libbrowser_ui_views|libcaptive_portal|libcapture_base|libcapture_lib|libcbor|libcc|libcc_animation|libcc_base|libcc_debug|libcc_ipc|libcc_mojo_embedder|libcc_paint|libcertificate_matching|libcert_verifier|libchrome_features|libchromium_sqlite3|libclearkeycdm|libclient|libcloud_policy_proto_generated_compile|libcodec|libcolor_space|libcolor_utils|libcommon|libcompositor|libcontent|libcontent_common_mojo_bindings_shared|libcontent_public_common_mojo_bindings_shared|libcontent_service_cpp|libcontent_service_mojom|libcontent_service_mojom_shared|libcontent_settings_features|libcrash_key_lib|libcrcrypto|libcrdtp|libdbus|libdevice_base|libdevice_event_log|libdevice_features|libdevice_gamepad|libdevices|libdevice_vr|libdevice_vr_mojo_bindings|libdevice_vr_mojo_bindings_blink|libdevice_vr_mojo_bindings_shared|libdevice_vr_test_mojo_bindings|libdevice_vr_test_mojo_bindings_blink|libdevice_vr_test_mojo_bindings_shared|libdiscardable_memory_client|libdiscardable_memory_common|libdiscardable_memory_service|libdisplay|libdisplay_types|libdisplay_util|libdomain_reliability|libdom_storage_mojom|libdom_storage_mojom_shared|libEGL|libEGL|libembedder|libembedder_switches|libevents|libevents_base|libevents_devices_x11|libevents_ozone_layout|libevents_x|libextras|libffmpeg|libfido|libfingerprint|libfreetype_harfbuzz|libgamepad_mojom|libgamepad_mojom_blink|libgamepad_mojom_shared|libgamepad_shared_typemap_traits|libgcm|libgeometry|libgeometry_skia|libgesture_detection|libgfx|libgfx_ipc|libgfx_ipc_buffer_types|libgfx_ipc_color|libgfx_ipc_geometry|libgfx_ipc_skia|libgfx_switches|libgfx_x11|libgin|libgles2|libgles2_implementation|libgles2_utils|libGLESv2|libGLESv2|libgl_init|libgl_in_process_context|libgl_wrapper|libgpu|libgpu_ipc_service|libgtkui|libheadless_non_renderer|libhost|libicui18n|libicuuc|libinterfaces_shared|libipc|libipc_mojom|libipc_mojom_shared|libkeycodes_x11|libkeyed_service_content|libkeyed_service_core|liblearning_common|liblearning_impl|libleveldatabase|libleveldb_proto|libmanager|libmedia|libmedia_blink|libmedia_gpu|libmedia_learning_mojo_impl|libmedia_message_center|libmedia_mojo_services|libmedia_session_base_cpp|libmedia_session_cpp|libmedia_webrtc|libmemory_instrumentation|libmenu|libmessage_center|libmessage_support|libmetrics_cpp|libmidi|libmirroring_service|libmojo_base_lib|libmojo_base_mojom|libmojo_base_mojom_blink|libmojo_base_mojom_shared|libmojo_base_shared_typemap_traits|libmojo_core_embedder|libmojo_core_embedder_internal|libmojo_core_ports|libmojo_cpp_platform|libmojom_core_shared|libmojom_mhtml_load_result_shared|libmojom_modules_shared|libmojo_mojom_bindings|libmojo_mojom_bindings_shared|libmojom_platform_shared|libmojo_public_system|libmojo_public_system_cpp|libnative_theme|libnet|libnetwork_cpp|libnetwork_cpp_base|libnetwork_service|libnetwork_session_configurator|libonc|libos_crypt|libparsers|libpdfium|libperfetto|libperformace_manager_public_mojom|libperformace_manager_public_mojom_blink|libperformace_manager_public_mojom_shared|libplatform|libplatform_window|libplatform_window_common|libplatform_window_handler_libs|libpolicy_component|libpolicy_proto|libppapi_host|libppapi_proxy|libppapi_shared|libprefs|libprinting|libproperties|libprotobuf_lite|libproxy_config|libpublic|librange|libraster|libresource_coordinator_public_mojom|libresource_coordinator_public_mojom_blink|libresource_coordinator_public_mojom_shared|libsandbox|libsandbox_services|libscheduling_metrics|libseccomp_bpf|libsecurity_state_features|libservice|libservice_manager_cpp|libservice_manager_cpp_types|libservice_manager_mojom|libservice_manager_mojom_blink|libservice_manager_mojom_constants|libservice_manager_mojom_constants_blink|libservice_manager_mojom_constants_shared|libservice_manager_mojom_shared|libservice_manager_mojom_traits|libservice_provider|libsessions|libshared_memory_support|libshared_with_blink|libshell_dialogs|libskia|libskia_shared_typemap_traits|libsnapshot|libsql|libstartup_tracing|libstorage_browser|libstorage_common|libstorage_service_public|libstub_window|libsuid_sandbox_client|libsurface|libsystem_media_controls|libtab_count_metrics|libthread_linux|libtracing|libtracing_cpp|libtracing_mojom|libtracing_mojom_shared|libui_accessibility_ax_mojom|libui_accessibility_ax_mojom_blink|libui_accessibility_ax_mojom_shared|libui_base|libui_base_clipboard|libui_base_clipboard_types|libui_base_features|libui_base_idle|libui_base_ime|libui_base_ime_init|libui_base_ime_linux|libui_base_ime_types|libui_base_x|libui_data_pack|libui_devtools|libui_message_center_cpp|libui_touch_selection|liburl|liburl_ipc|liburl_matcher|libusb_shared|libuser_manager|libuser_prefs|libv8|libv8_libbase|libv8_libplatform|libviews|libviz_common|libviz_resource_format_utils|libviz_vulkan_context_provider|libVkICD_mock_icd|libvk_swiftshader|libvr_base|libvr_common|libvulkan_info|libvulkan_init|libvulkan_wrapper|libvulkan_x11|libvulkan_ycbcr_info|libweb_bluetooth_mojo_bindings_shared|libwebdata_common|libweb_dialogs|libweb_feature_mojo_bindings_mojom|libweb_feature_mojo_bindings_mojom_blink|libweb_feature_mojo_bindings_mojom_shared|libwebgpu|libweb_modal|libwebrtc_component|libwebview|libwm|libwm_public|libwtf|libwtf_support|libx11_events_platform|libx11_window|libzygote
%global __requires_exclude ^(%{privlibs})\\.so*
%endif
%global asan 1
%global bundleicu 1
%global bundlere2 1
%global bundlelibxml 1
%global bundlepylibs 1
%global bundleminizip 0
%global gtk3 1
%global dts_version 9
%global bundleopus 1
%global bundlelibusbx 1
%global bundleharfbuzz 1
%global bundlelibwebp 1
%global bundlelibpng 1
%global bundlelibjpeg 1
%global bundlefreetype 1
%global bundlelibdrm 1
%global bundlefontconfig 1
%global bundleharfbuzz 0
%if %{useapikeys}
%global api_key AIzaSyDUIXvzVrt5OkVsgXhQ6NFfvWlA44by-aw
%global default_client_id 449907151817.apps.googleusercontent.com
%global default_client_secret miEreAep8nuvTdvLums6qyLK
%global chromoting_client_id 449907151817-8vnlfih032ni8c4jjps9int9t86k546t.apps.googleusercontent.com
%else
%global api_key %nil
%global default_client_id %nil
%global default_client_secret %nil
%global chromoting_client_id %nil
%endif
%global majorversion 87
%if %{freeworld}
Name: chromium%{chromium_channel}%{nsuffix}
%else
Name: chromium%{chromium_channel}
%endif
Version: %{majorversion}.0.4280.141
Release: 1
%if %{?freeworld}
%if %{?shared}
Summary: Chromium media libraries built with all possible codecs
%else
Summary: A WebKit (Blink) powered web browser built with all possible codecs
%endif
%else
Summary: A WebKit (Blink) powered web browser
%endif
Url: http://www.chromium.org/Home
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
Patch0: chromium-70.0.3538.67-sandbox-pie.patch
Patch1: chromium-86.0.4240.75-initial_prefs-etc-path.patch
Patch2: chromium-67.0.3396.62-gn-system.patch
Patch3: chromium-60.0.3112.78-no-libpng-prefix.patch
Patch4: chromium-60.0.3112.78-jpeg-nomangle.patch
Patch5: chromium-77.0.3865.75-no-zlib-mangle.patch
Patch6: chromium-86.0.4240.75-norar.patch
Patch7: chromium-71.0.3578.98-widevine-r3.patch
Patch8: chromium-83.0.4103.61-disable-fontconfig-cache-magic.patch
Patch9: chromium-78.0.3904.70-gcc9-drop-rsp-clobber.patch
Patch10: chromium-86.0.4240.75-widevine-other-locations.patch
Patch11: chromium-71.0.3578.98-py2-bootstrap.patch
Patch50: chromium-75.0.3770.80-grpc-gettid-fix.patch
Patch51: chromium-76.0.3809.100-gcc-remoting-constexpr.patch
Patch52: chromium-81.0.4044.92-unbundle-zlib.patch
Patch53: chromium-77.0.3865.75-gcc-include-memory.patch
Patch54: chromium-79-gcc-protobuf-alignas.patch
Patch55: chromium-78-protobuf-RepeatedPtrField-export.patch
Patch57: chromium-80.0.3987.87-missing-cstdint-header.patch
Patch58: chromium-80.0.3987.106-missing-cstring-header.patch
Patch59: chromium-53-ffmpeg-no-deprecation-errors.patch
Patch61: chromium-84-blink-disable-clang-format.patch
Patch62: chromium-fix-char_traits.patch
Patch63: chromium-87-CursorFactory-include.patch
Patch64: chromium-87-openscreen-include.patch
Patch65: chromium-87-ServiceWorkerContainerHost-crash.patch
Patch66: chromium-88-vaapi-attribute.patch
Patch68: chromium-84.0.4147.105-gn-gcc-cleanup.patch
Patch69: chromium-84.0.4147.125-remoting-cstring.patch
Patch70: chromium-84.0.4147.125-i686-fix_textrels.patch
Patch71: chromium-84.0.4147.125-aarch64-clearkeycdm-binutils-workaround.patch
Patch101: chromium-75.0.3770.100-epel7-stdc++.patch
Patch102: chromium-80.0.3987.132-el7-noexcept.patch
Patch103: chromium-86.0.4240.75-epel7-no-kcmp-h.patch
Patch104: chromium-84.0.4147.89-epel7-old-cups.patch
Patch106: chromium-77-clang.patch
Patch108: chromium-85.0.4183.83-el7-old-libdrm.patch
Patch109: chromium-87.0.4280.66-el7-no-sys-random.patch
Patch202: chromium-86.0.4240.75-enable-hardware-accelerated-mjpeg.patch
Patch203: chromium-86.0.4240.75-vaapi-i686-fpermissive.patch
Patch205: chromium-86.0.4240.75-fix-vaapi-on-intel.patch
Patch300: chromium-76.0.3809.132-rhel8-force-disable-use_gnome_keyring.patch
Patch301: openEuler-chromium87-kunpeng-aarch64-PAGE_SIZE-64.patch
Patch400: chromium-gcc11.patch
%if %{freeworld}
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}-clean.tar.xz
%else
Source0: chromium-%{version}-clean.tar.xz
%endif
Source2: depot_tools.git-master.tar.gz
Source3: chromium-browser.sh
Source4: %{chromium_browser_channel}.desktop
Source5: clean_ffmpeg.sh
Source7: get_free_ffmpeg_source_files.py
Source8: get_linux_tests_names.py
Source9: chromium-browser.xml
Source11: chrome-remote-desktop@.service
Source13: master_preferences
Source14: https://fontlibrary.org/assets/downloads/gelasio/4d610887ff4d445cbc639aae7828d139/gelasio.zip
Source15: http://download.savannah.nongnu.org/releases/freebangfont/MuktiNarrow-0.94.tar.bz2
Source16: https://github.com/web-platform-tests/wpt/raw/master/fonts/Ahem.ttf
Source17: GardinerModBug.ttf
Source18: GardinerModCat.ttf
Source20: https://www.x.org/releases/individual/proto/xcb-proto-1.14.tar.xz
Source21: chromium-87.0.4280.141.tar.xz.aa
Source22: chromium-87.0.4280.141.tar.xz.ab
Source23: chromium-87.0.4280.141.tar.xz.ac
BuildRequires: gcc-c++
BuildRequires: alsa-lib-devel atk-devel bison cups-devel dbus-devel desktop-file-utils
BuildRequires: expat-devel flex fontconfig-devel glib2-devel glibc-devel gperf
%if 0%{?bundleharfbuzz}
%else
BuildRequires: harfbuzz-devel >= 2.4.0
%endif
BuildRequires: libatomic libcap-devel
%if 0%{?bundlelibdrm}
%else
BuildRequires: libdrm-devel
%endif
BuildRequires: libgcrypt-devel libudev-devel libuuid-devel libusb-devel libXdamage-devel
BuildRequires: libXtst-devel xcb-proto mesa-libgbm-devel minizip-devel nodejs
BuildRequires: nss-devel >= 3.26 pciutils-devel pulseaudio-libs-devel
BuildRequires: pkgconfig(libpipewire-0.2)
BuildRequires: libappstream-glib
BuildRequires: libstdc++-static libstdc++-devel, openssl-devel bzip2-devel dbus-glib-devel
BuildRequires: elfutils-libelf-devel flac-devel
%if 0%{?bundlefreetype}
%else
BuildRequires: freetype-devel
%endif
BuildRequires: hwdata kernel-headers libevent-devel libffi-devel
%if 0%{?bundleicu}
%else
BuildRequires: libicu-devel = 54.1
%endif
%if 0%{?bundlelibjpeg}
%else
BuildRequires: libjpeg-devel
%endif
%if 0%{?bundlelibpng}
%else
BuildRequires: libpng-devel
%endif
BuildRequires: libudev-devel
%if %{bundlelibusbx}
%else
Requires: libusbx >= 1.0.21-0.1.git448584a
BuildRequires: libusbx-devel >= 1.0.21-0.1.git448584a
%endif
BuildRequires: libva-devel
%if %{bundlelibwebp}
%else
BuildRequires: libwebp-devel
%endif
BuildRequires: libxslt-devel mesa-libGL-devel
%if %{bundleopus}
%else
BuildRequires: opus-devel
%endif
BuildRequires: perl(Switch)
%if 0%{gtk3}
BuildRequires: pkgconfig(gtk+-3.0)
%else
BuildRequires: pkgconfig(gtk+-2.0)
%endif
BuildRequires: /usr/bin/python2 python2-devel
%if 0%{?bundlepylibs}
%else
BuildRequires: python-beautifulsoup4 python-BeautifulSoup python-html5lib
BuildRequires: python-markupsafe python-ply python2-simplejson
%endif
%if 0%{?bundlere2}
%else
Requires: re2 >= 20160401
BuildRequires: re2-devel >= 20160401
%endif
BuildRequires: speech-dispatcher-devel yasm zlib-devel pam-devel systemd clang llvm
%if %{freeworld}
%else
Source100: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Bold.ttf
Source101: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-BoldItalic.ttf
Source102: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Italic.ttf
Source103: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Regular.ttf
Source104: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Bold.ttf
Source105: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-BoldItalic.ttf
Source106: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Italic.ttf
Source107: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Regular.ttf
Source108: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Bold.ttf
Source109: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-BoldItalic.ttf
Source110: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Italic.ttf
Source111: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Regular.ttf
BuildRequires: google-noto-sans-cjk-jp-fonts lohit-gurmukhi-fonts dejavu-sans-fonts
BuildRequires: thai-scalable-garuda-fonts lohit-devanagari-fonts lohit-tamil-fonts
BuildRequires: google-noto-sans-khmer-fonts google-noto-emoji-color-fonts
BuildRequires: google-noto-sans-symbols2-fonts google-noto-sans-tibetan-fonts
%endif
BuildRequires: ninja-build java-1.8.0-openjdk-headless
Requires: nss%{_isa} >= 3.26 nss-mdns%{_isa}
%if 0%{gtk3}
Requires: libcanberra-gtk3%{_isa}
%else
Requires: libcanberra-gtk2%{_isa}
%endif
Requires: u2f-hidraw-policy
Provides: chromium-ffmpegsumo = %{version}-%{release}
Obsoletes: chromium-ffmpegsumo <= 35.0.1916.114
Provides: chromium-v8 = %{version}-%{release}
Obsoletes: chromium-v8 <= 3.25.28.18
Provides: webrtc = 0.2
Obsoletes: webrtc <= 0.1
Requires: chromium-common%{_isa} = %{version}-%{release}
%if 0%{?shared}
%if 0%{?freeworld}
Provides: chromium-libs-media = %{version}-%{release}
Provides: chromium-libs-media%{_isa} = %{version}-%{release}
Requires: chromium-libs%{_isa} = %{version}
Requires(post): %{_sbindir}/update-alternatives
Requires(preun): %{_sbindir}/update-alternatives
%else
Requires: chromium-libs%{_isa} = %{version}-%{release}
Requires: chromium-libs-media%{_isa} = %{version}-%{release}
%endif
%else
Provides: chromium-libs = %{version}-%{release}
Obsoletes: chromium-libs <= %{version}-%{release}
%endif
ExclusiveArch: x86_64 i686 aarch64
Provides: bundled(angle) = 2422
Provides: bundled(bintrees) = 1.0.1
Provides: bundled(boringssl)
Provides: bundled(brotli) = 222564a95d9ab58865a096b8d9f7324ea5f2e03e
Provides: bundled(bspatch)
Provides: bundled(cacheinvalidation) = 20150720
Provides: bundled(colorama) = 799604a104
Provides: bundled(crashpad)
Provides: bundled(dmg_fp)
Provides: bundled(expat) = 2.2.0
Provides: bundled(fdmlibm) = 5.3
Provides: bundled(ffmpeg) = 3.2git
Provides: bundled(fips181) = 2.2.3
%if 0%{?bundlefontconfig}
Provides: bundled(fontconfig) = 2.12.6
%endif
%if 0%{?bundlefreetype}
Provides: bundled(freetype) = 2.9.3
%endif
Provides: bundled(gperftools) = svn144
%if 0%{?bundleharfbuzz}
Provides: bundled(harfbuzz) = 2.4.0
%endif
Provides: bundled(hunspell) = 1.6.0
Provides: bundled(iccjpeg)
%if 0%{?bundleicu}
Provides: bundled(icu) = 58.1
%endif
Provides: bundled(kitchensink) = 1
Provides: bundled(leveldb) = 1.20
Provides: bundled(libaddressinput) = 0
%if 0%{?bundlelibdrm}
Provides: bundled(libdrm) = 2.4.85
%endif
Provides: bundled(libevent) = 1.4.15
Provides: bundled(libjingle) = 9564
%if 0%{?bundlelibjpeg}
Provides: bundled(libjpeg-turbo) = 1.4.90
%endif
Provides: bundled(libphonenumber) = a4da30df63a097d67e3c429ead6790ad91d36cf4
%if 0%{?bundlelibpng}
Provides: bundled(libpng) = 1.6.22
%endif
Provides: bundled(libsrtp) = 2cbd85085037dc7bf2eda48d4cf62e2829056e2d
%if %{bundlelibusbx}
Provides: bundled(libusbx) = 1.0.17
%endif
Provides: bundled(libvpx) = 1.6.0
%if %{bundlelibwebp}
Provides: bundled(libwebp) = 0.6.0
%endif
%if %{bundlelibxml}
Provides: bundled(libxml) = 2.9.4
%endif
Provides: bundled(libXNVCtrl) = 302.17
Provides: bundled(libyuv) = 1651
Provides: bundled(lzma) = 15.14
Provides: bundled(libudis86) = 1.7.1
Provides: bundled(mesa) = 9.0.3
Provides: bundled(NSBezierPath) = 1.0
Provides: bundled(mozc)
%if %{bundleopus}
Provides: bundled(opus) = 1.1.3
%endif
Provides: bundled(ots) = 8d70cffebbfa58f67a5c3ed0e9bc84dccdbc5bc0
Provides: bundled(protobuf) = 3.0.0.beta.3
Provides: bundled(qcms) = 4
%if 0%{?bundlere2}
Provides: bundled(re2)
%endif
Provides: bundled(sfntly) = 04740d2600193b14aa3ef24cd9fbb3d5996b9f77
Provides: bundled(skia)
Provides: bundled(SMHasher) = 0
Provides: bundled(snappy) = 1.1.4-head
Provides: bundled(speech-dispatcher) = 0.7.1
Provides: bundled(sqlite) = 3.17patched
Provides: bundled(superfasthash) = 0
Provides: bundled(talloc) = 2.0.1
Provides: bundled(usrsctp) = 0
Provides: bundled(v8) = 5.9.211.31
Provides: bundled(webrtc) = 90usrsctp
Provides: bundled(woff2) = 445f541996fe8376f3976d35692fd2b9a6eedf2d
Provides: bundled(xdg-mime)
Provides: bundled(xdg-user-dirs)
Requires(post): /usr/sbin/semanage
Requires(post): /usr/sbin/restorecon
%if %{?shared}
%else
Provides: chromium-libs = %{version}-%{release}
Obsoletes: chromium-libs <= %{version}-%{release}
Provides: chromium-libs-media = %{version}-%{release}
Obsoletes: chromium-libs-media <= %{version}-%{release}
Provides: chromium-libs-media-freeworld = %{version}-%{release}
Obsoletes: chromium-libs-media-freeworld <= %{version}-%{release}
%endif
%if %{?freeworld}
%if %{?shared}
%description
Chromium media libraries built with all possible codecs. Chromium is an
open-source web browser, powered by WebKit (Blink). This package replaces
the default chromium-libs-media package, which is limited in what it
can include.
%else
%description
Chromium built with all possible codecs. Chromium is an
open-source web browser, powered by WebKit (Blink).
%endif
%else
%description
Chromium is an open-source web browser, powered by WebKit (Blink).
%endif
%package common
Summary: Files needed for both the headless_shell and full Chromium
Requires: minizip%{_isa}
%if ! %{build_remoting}
Provides: chrome-remote-desktop = %{version}-%{release}
Obsoletes: chrome-remote-desktop <= 81.0.4044.138
%endif
%description common
%{summary}.
%if 0%{?shared}
%package libs
Summary: Shared libraries used by chromium (and chrome-remote-desktop)
Requires: chromium-common%{_isa} = %{version}-%{release}
Requires: chromium-libs-media%{_isa} >= %{majorversion}
Requires(post): %{_sbindir}/update-alternatives
Requires(preun): %{_sbindir}/update-alternatives
%description libs
Shared libraries used by chromium (and chrome-remote-desktop).
%if ! %{freeworld}
%package libs-media
Summary: Shared libraries used by the chromium media subsystem
Requires: chromium-libs%{_isa} = %{version}
Requires(post): %{_sbindir}/update-alternatives
Requires(preun): %{_sbindir}/update-alternatives
%description libs-media
Shared libraries used by the chromium media subsystem.
%endif
%endif
%if %{build_remoting}
%package -n chrome-remote-desktop
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: xorg-x11-server-Xvfb python2-psutil
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{version}-%{release}
%else
Requires: chromium-common%{_isa} = %{version}-%{release}
%endif
Summary: Remote desktop support for google-chrome & chromium
%description -n chrome-remote-desktop
Remote desktop support for google-chrome & chromium.
%endif
%package -n chromedriver
Summary: WebDriver for Google Chrome/Chromium
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{version}-%{release}
%else
Requires: chromium-common%{_isa} = %{version}-%{release}
%endif
Provides: chromedriver-stable = %{version}-%{release}
Conflicts: chromedriver-testing
Conflicts: chromedriver-unstable
%description -n chromedriver
WebDriver is an open source tool for automated testing of webapps across many
browsers. It provides capabilities for navigating to web pages, user input,
JavaScript execution, and more. ChromeDriver is a standalone server which
implements WebDriver's wire protocol for Chromium. It is being developed by
members of the Chromium and WebDriver teams.
%package headless
Summary: A minimal headless shell built from Chromium
Requires: chromium-common%{_isa} = %{version}-%{release}
%description headless
A minimal headless client built from Chromium. headless_shell is built
without support for alsa, cups, dbus, gconf, gio, kerberos, pulseaudio, or
udev.
%prep
cd ../SOURCES
cat %{SOURCE21} %{SOURCE22} %{SOURCE23} > %{SOURCE0}
cd ..
%setup -q -T -c -n depot_tools -a 2
%setup -q -n chromium-%{version}
%patch0 -p1 -b .sandboxpie
%patch1 -p1 -b .etc
%patch2 -p1 -b .gnsystem
%patch3 -p1 -b .nolibpngprefix
#%patch4 -p1 -b .nolibjpegmangle
%patch5 -p1 -b .nozlibmangle
%patch6 -p1 -b .nounrar
%patch7 -p1 -b .widevine-hack
%patch8 -p1 -b .nofontconfigcache
%patch9 -p1 -b .gcc9
%patch10 -p1 -b .widevine-other-locations
%patch11 -p1 -b .py2
%patch50 -p1 -b .gettid-fix
%patch51 -p1 -b .gcc-remoting-constexpr
%patch52 -p1 -b .unbundle-zlib
%patch53 -p1 -b .gcc-include-memory
%patch54 -p1 -b .base-gcc-no-alignas
%patch55 -p1 -b .protobuf-export
%patch57 -p1 -b .missing-cstdint
%patch58 -p1 -b .missing-cstring
%patch59 -p1 -b .ffmpeg-deprecations
%patch61 -p1 -b .blink-disable-clang-format
%patch62 -p1 -b .fix-char_traits
%patch63 -p1 -b .CursorFactory-include
%patch64 -p1 -b .openscreen-include
%patch65 -p1 -b .ServiceWorkerContainerHost-crash
%patch66 -p1 -b .vaapi-attribute
%patch68 -p1 -b .gn-gcc-cleanup
%patch69 -p1 -b .remoting-cstring
%patch70 -p1 -b .i686-textrels
%patch71 -p1 -b .aarch64-clearkeycdm-binutils-workaround
%if %{use_vaapi}
%patch202 -p1 -b .accel-mjpeg
%ifarch i686
%patch203 -p1 -b .i686permissive
%endif
%patch205 -p1 -b .vaapi-intel-fix
%endif
%patch300 -p1 -b .disblegnomekeyring
%ifarch aarch64
%patch301 -p1
%endif
%patch400 -p1 -b .gcc11
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
%if 0%{?asan}
export CC="clang"
export CXX="clang++"
%else
export CC="gcc"
export CXX="g++"
%endif
export AR="ar"
export RANLIB="ranlib"
rm -rf buildtools/third_party/libc++/BUILD.gn
%if %{freeworld}
%else
pushd third_party/test_fonts
mkdir test_fonts
cd test_fonts
unzip %{SOURCE14}
tar xf %{SOURCE15}
mv MuktiNarrow0.94/MuktiNarrow.ttf .
rm -rf MuktiNarrow0.94
cp %{SOURCE16} .
cp %{SOURCE17} .
cp %{SOURCE18} .
cp %{SOURCE100} .
cp %{SOURCE101} .
cp %{SOURCE102} .
cp %{SOURCE103} .
cp %{SOURCE104} .
cp %{SOURCE105} .
cp %{SOURCE106} .
cp %{SOURCE107} .
cp %{SOURCE108} .
cp %{SOURCE109} .
cp %{SOURCE110} .
cp %{SOURCE111} .
cp -a /usr/share/fonts/lohit-gurmukhi/Lohit-Gurmukhi.ttf .
cp -a /usr/share/fonts/google-noto-cjk/NotoSansCJKjp-Regular.otf .
cp -a /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf .
cp -a /usr/share/fonts/thai-scalable/Garuda.ttf .
cp -a /usr/share/fonts/lohit-devanagari/Lohit-Devanagari.ttf /usr/share/fonts/lohit-tamil/Lohit-Tamil.ttf .
cp -a /usr/share/fonts/google-noto/NotoSansKhmer-Regular.ttf .
cp -a /usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf .
cp -a /usr/share/fonts/google-noto/NotoSansSymbols2-Regular.ttf /usr/share/fonts/google-noto/NotoSansTibetan-Regular.ttf .
popd
%endif
CHROMIUM_CORE_GN_DEFINES=""
CHROMIUM_CORE_GN_DEFINES+=' is_debug=false'
%ifarch x86_64 aarch64
CHROMIUM_CORE_GN_DEFINES+=' system_libdir="lib64"'
%endif
CHROMIUM_CORE_GN_DEFINES+=' google_api_key="%{api_key}" google_default_client_id="%{default_client_id}" google_default_client_secret="%{default_client_secret}"'
CHROMIUM_CORE_GN_DEFINES+=' is_clang=false use_sysroot=false fieldtrial_testing_like_official_build=true use_lld=false rtc_enable_symbol_export=true'
%if %{use_gold}
CHROMIUM_CORE_GN_DEFINES+=' use_gold=true'
%else
CHROMIUM_CORE_GN_DEFINES+=' use_gold=false'
%endif
%if %{freeworld}
CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="ChromeOS" proprietary_codecs=true'
%else
CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=false'
%endif
CHROMIUM_CORE_GN_DEFINES+=' treat_warnings_as_errors=false'
CHROMIUM_CORE_GN_DEFINES+=' use_custom_libcxx=false'
CHROMIUM_CORE_GN_DEFINES+=' use_kerberos=true'
%ifarch aarch64
CHROMIUM_CORE_GN_DEFINES+=' target_cpu="arm64"'
%endif
%if %{?use_jumbo}
CHROMIUM_CORE_GN_DEFINES+=' use_jumbo_build=true jumbo_file_merge_limit=8'
%endif
CHROMIUM_CORE_GN_DEFINES+=' use_gnome_keyring=false use_glib=true'
export CHROMIUM_CORE_GN_DEFINES
CHROMIUM_BROWSER_GN_DEFINES=""
CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true icu_use_data_file=true'
CHROMIUM_BROWSER_GN_DEFINES+=' enable_nacl=false'
%if 0%{?shared}
CHROMIUM_BROWSER_GN_DEFINES+=' is_component_ffmpeg=true is_component_build=true'
%else
CHROMIUM_BROWSER_GN_DEFINES+=' is_component_ffmpeg=false is_component_build=false'
%endif
CHROMIUM_BROWSER_GN_DEFINES+=' blink_symbol_level=0 enable_hangout_services_extension=true'
CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true'
CHROMIUM_BROWSER_GN_DEFINES+=' enable_widevine=true'
%if %{use_vaapi}
CHROMIUM_BROWSER_GN_DEFINES+=' use_vaapi=true'
%endif
CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_pipewire=true rtc_link_pipewire=true'
export CHROMIUM_BROWSER_GN_DEFINES
CHROMIUM_HEADLESS_GN_DEFINES=""
CHROMIUM_HEADLESS_GN_DEFINES+=' use_ozone=true ozone_auto_platforms=false ozone_platform="headless" ozone_platform_headless=true'
CHROMIUM_HEADLESS_GN_DEFINES+=' headless_use_embedded_resources=false icu_use_data_file=false v8_use_external_startup_data=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' enable_nacl=false enable_print_preview=false enable_remoting=false use_alsa=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_cups=false use_dbus=false use_gio=false use_kerberos=false use_libpci=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_pulseaudio=false use_udev=false use_gtk=false use_glib=false use_x11=false'
export CHROMIUM_HEADLESS_GN_DEFINES
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
build/linux/unbundle/remove_bundled_libraries.py \
'base/third_party/cityhash' \
'base/third_party/cityhash_v103' \
'base/third_party/double_conversion' \
'base/third_party/dynamic_annotations' \
'base/third_party/icu' \
'base/third_party/libevent' \
'base/third_party/nspr' \
'base/third_party/superfasthash' \
'base/third_party/symbolize' \
'base/third_party/valgrind' \
'base/third_party/xdg_mime' \
'base/third_party/xdg_user_dirs' \
'buildtools/third_party/libc++' \
'buildtools/third_party/libc++abi' \
'chrome/third_party/mozilla_security_manager' \
'courgette/third_party' \
'net/third_party/mozilla_security_manager' \
'net/third_party/nss' \
'net/third_party/quiche' \
'net/third_party/uri_template' \
'third_party/abseil-cpp' \
'third_party/adobe' \
'third_party/angle' \
'third_party/angle/src/common/third_party/base' \
'third_party/angle/src/common/third_party/smhasher' \
'third_party/angle/src/common/third_party/xxhash' \
'third_party/angle/src/third_party/compiler' \
'third_party/angle/src/third_party/libXNVCtrl' \
'third_party/angle/src/third_party/trace_event' \
'third_party/angle/src/third_party/volk' \
'third_party/angle/third_party/glslang' \
'third_party/angle/third_party/spirv-headers' \
'third_party/angle/third_party/spirv-tools' \
'third_party/angle/third_party/vulkan-headers' \
'third_party/angle/third_party/vulkan-loader' \
'third_party/angle/third_party/vulkan-tools' \
'third_party/angle/third_party/vulkan-validation-layers' \
'third_party/apple_apsl' \
'third_party/axe-core' \
'third_party/blanketjs' \
'third_party/blink' \
'third_party/boringssl' \
'third_party/boringssl/src/third_party/fiat' \
'third_party/breakpad' \
'third_party/breakpad/breakpad/src/third_party/curl' \
'third_party/brotli' \
'third_party/catapult' \
'third_party/catapult/common/py_vulcanize/third_party/rcssmin' \
'third_party/catapult/common/py_vulcanize/third_party/rjsmin' \
'third_party/catapult/third_party/beautifulsoup4' \
'third_party/catapult/third_party/google-endpoints' \
'third_party/catapult/third_party/html5lib-python' \
'third_party/catapult/third_party/polymer' \
'third_party/catapult/third_party/six' \
'third_party/catapult/tracing/third_party/d3' \
'third_party/catapult/tracing/third_party/gl-matrix' \
'third_party/catapult/tracing/third_party/jpeg-js' \
'third_party/catapult/tracing/third_party/jszip' \
'third_party/catapult/tracing/third_party/mannwhitneyu' \
'third_party/catapult/tracing/third_party/oboe' \
'third_party/catapult/tracing/third_party/pako' \
'third_party/ced' \
'third_party/cld_3' \
'third_party/closure_compiler' \
'third_party/crashpad' \
'third_party/crashpad/crashpad/third_party/lss' \
'third_party/crashpad/crashpad/third_party/zlib/' \
'third_party/crc32c' \
'third_party/cros_system_api' \
'third_party/dav1d' \
'third_party/dawn' \
'third_party/depot_tools' \
'third_party/devscripts' \
'third_party/devtools-frontend' \
'third_party/devtools-frontend/src/third_party/typescript' \
'third_party/devtools-frontend/src/front_end/third_party/acorn' \
'third_party/devtools-frontend/src/front_end/third_party/axe-core' \
'third_party/devtools-frontend/src/front_end/third_party/chromium' \
'third_party/devtools-frontend/src/front_end/third_party/codemirror' \
'third_party/devtools-frontend/src/front_end/third_party/fabricjs' \
'third_party/devtools-frontend/src/front_end/third_party/i18n' \
'third_party/devtools-frontend/src/front_end/third_party/intl-messageformat' \
'third_party/devtools-frontend/src/front_end/third_party/lighthouse' \
'third_party/devtools-frontend/src/front_end/third_party/lit-html' \
'third_party/devtools-frontend/src/front_end/third_party/lodash-isequal' \
'third_party/devtools-frontend/src/front_end/third_party/marked' \
'third_party/devtools-frontend/src/front_end/third_party/puppeteer' \
'third_party/devtools-frontend/src/front_end/third_party/wasmparser' \
'third_party/dom_distiller_js' \
'third_party/emoji-segmenter' \
'third_party/expat' \
'third_party/ffmpeg' \
'third_party/flac' \
'third_party/flatbuffers' \
'third_party/fontconfig' \
'third_party/freetype' \
'third_party/glslang' \
'third_party/google_input_tools' \
'third_party/google_input_tools/third_party/closure_library' \
'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
'third_party/google_trust_services' \
'third_party/googletest' \
'third_party/grpc' \
'third_party/grpc/src/third_party/nanopb' \
'third_party/harfbuzz-ng' \
'third_party/hunspell' \
'third_party/iccjpeg' \
'third_party/icu' \
'third_party/inspector_protocol' \
'third_party/jinja2' \
'third_party/jsoncpp' \
'third_party/jstemplate' \
'third_party/khronos' \
'third_party/leveldatabase' \
'third_party/libXNVCtrl' \
'third_party/libaddressinput' \
'third_party/libaom' \
'third_party/libaom/source/libaom/third_party/vector' \
'third_party/libaom/source/libaom/third_party/x86inc' \
'third_party/libavif' \
'third_party/libdrm' \
'third_party/libgifcodec' \
'third_party/libjingle' \
'third_party/libjpeg_turbo' \
'third_party/libphonenumber' \
'third_party/libpng' \
'third_party/libsecret' \
'third_party/libsrtp' \
'third_party/libsync' \
'third_party/libudev' \
'third_party/libusb' \
'third_party/libvpx' \
'third_party/libvpx/source/libvpx/third_party/x86inc' \
'third_party/libwebm' \
'third_party/libwebp' \
'third_party/libxml' \
'third_party/libxml/chromium' \
'third_party/libxslt' \
'third_party/libyuv' \
'third_party/lottie' \
'third_party/lss' \
'third_party/lzma_sdk' \
'third_party/mako' \
%if 0%{?bundlepylibs}
'third_party/markupsafe' \
%endif
'third_party/mesa' \
'third_party/metrics_proto' \
'third_party/modp_b64' \
'third_party/nasm' \
'third_party/nearby' \
'third_party/node' \
'third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2' \
'third_party/one_euro_filter' \
'third_party/opencv' \
%if %{freeworld}
'third_party/openh264' \
%endif
'third_party/openscreen' \
'third_party/openscreen/src/third_party/mozilla' \
'third_party/openscreen/src/third_party/tinycbor' \
'third_party/opus' \
'third_party/ots' \
'third_party/pdfium' \
'third_party/pdfium/third_party/agg23' \
'third_party/pdfium/third_party/base' \
'third_party/pdfium/third_party/bigint' \
'third_party/pdfium/third_party/freetype' \
'third_party/pdfium/third_party/lcms' \
'third_party/pdfium/third_party/libopenjpeg20' \
'third_party/pdfium/third_party/libpng16' \
'third_party/pdfium/third_party/libtiff' \
'third_party/pdfium/third_party/skia_shared' \
'third_party/perfetto' \
'third_party/pffft' \
'third_party/ply' \
'third_party/polymer' \
'third_party/private-join-and-compute' \
'third_party/private_membership' \
'third_party/protobuf' \
'third_party/protobuf/third_party/six' \
'third_party/pyjson5' \
'third_party/qcms' \
'third_party/qunit' \
%if 0%{?bundlere2}
'third_party/re2' \
%endif
'third_party/rnnoise' \
'third_party/s2cellid' \
'third_party/schema_org' \
'third_party/securemessage' \
'third_party/shaka-player' \
'third_party/shell-encryption' \
'third_party/simplejson' \
'third_party/sinonjs' \
'third_party/skia' \
'third_party/skia/include/third_party/skcms' \
'third_party/skia/include/third_party/vulkan' \
'third_party/skia/third_party/skcms' \
'third_party/skia/third_party/vulkan' \
'third_party/smhasher' \
'third_party/snappy' \
'third_party/speech-dispatcher' \
'third_party/spirv-headers' \
'third_party/SPIRV-Tools' \
'third_party/sqlite' \
'third_party/swiftshader' \
'third_party/swiftshader/third_party/astc-encoder' \
'third_party/swiftshader/third_party/llvm-subzero' \
'third_party/swiftshader/third_party/llvm-10.0' \
'third_party/swiftshader/third_party/marl' \
'third_party/swiftshader/third_party/subzero' \
'third_party/swiftshader/third_party/SPIRV-Headers' \
'third_party/tcmalloc' \
'third_party/test_fonts' \
'third_party/ukey2' \
'third_party/usb_ids' \
'third_party/usrsctp' \
'third_party/vulkan' \
'third_party/wayland' \
'third_party/web-animations-js' \
'third_party/webdriver' \
'third_party/webrtc' \
'third_party/webrtc/common_audio/third_party/ooura' \
'third_party/webrtc/common_audio/third_party/spl_sqrt_floor' \
'third_party/webrtc/modules/third_party/fft' \
'third_party/webrtc/modules/third_party/g711' \
'third_party/webrtc/modules/third_party/g722' \
'third_party/webrtc/rtc_base/third_party/base64' \
'third_party/webrtc/rtc_base/third_party/sigslot' \
'third_party/widevine' \
'third_party/woff2' \
'third_party/wuffs' \
'third_party/xcbproto' \
'third_party/xdg-utils' \
'third_party/zxcvbn-cpp' \
'third_party/zlib' \
'third_party/zlib/google' \
'tools/gn/src/base/third_party/icu' \
'tools/grit/third_party/six' \
'url/third_party/mozilla' \
'v8/src/third_party/siphash' \
'v8/src/third_party/utf8-decoder' \
'v8/src/third_party/valgrind' \
'v8/third_party/v8' \
'v8/third_party/inspector_protocol' \
--do-remove
%if ! 0%{?bundlepylibs}
rm -rf third_party/markupsafe
ln -s %{python2_sitearch}/markupsafe third_party/markupsafe
%endif
sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc
export PATH=$PATH:%{_builddir}/depot_tools
build/linux/unbundle/replace_gn_files.py --system-libraries \
%if 0%{?bundlefontconfig}
%else
fontconfig \
%endif
%if 0%{?bundlefreetype}
%else
freetype \
%endif
%if 0%{?bundleharfbuzz}
%else
harfbuzz-ng \
%endif
%if 0%{?bundleicu}
%else
icu \
%endif
%if %{bundlelibdrm}
%else
libdrm \
%endif
%if %{bundlelibjpeg}
%else
libjpeg \
%endif
%if %{bundlelibpng}
%else
libpng \
%endif
%if %{bundlelibusbx}
%else
libusb \
%endif
%if %{bundlelibwebp}
%else
libwebp \
%endif
%if %{bundlelibxml}
%else
libxml \
%endif
libxslt \
%if %{bundleopus}
%else
opus \
%endif
%if 0%{?bundlere2}
%else
re2 \
%endif
%if 0%{?bundleminizip}
%else
zlib \
%endif
flac
sed -i 's|arm-linux-gnueabihf-|arm-linux-gnu-|g' build/toolchain/linux/BUILD.gn
%ifarch aarch64
sed -i 's|aarch64-linux-gnu-||g' build/toolchain/linux/BUILD.gn
sed -i '/${LONG_BIT}/ a \ aarch64)\' ../depot_tools/ninja
sed -i '/aarch64)/ a \ exec "/usr/bin/ninja-build" "$@";;\' ../depot_tools/ninja
%endif
sed -i 's|exec "${THIS_DIR}/ninja-linux${LONG_BIT}"|exec "/usr/bin/ninja-build"|g' ../depot_tools/ninja
if python2 -c 'import google ; print google.__path__' 2> /dev/null ; then \
echo "Python 2 'google' module is defined, this will shadow modules of this build"; \
exit 1 ; \
fi
tools/gn/bootstrap/bootstrap.py -v --no-clean --gn-gen-args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES"
%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir}
%if %{freeworld}
%else
%if %{build_headless}
%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_HEADLESS_GN_DEFINES" %{headlessbuilddir}
%endif
%endif
%if %{build_remoting}
%{builddir}/gn --script-executable=/usr/bin/python2 gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{remotingbuilddir}
%endif
%if %{bundlelibusbx}
%else
rm -rf third_party/libusb/src/libusb/libusb.h
cp -a %{_includedir}/libusb-1.0/libusb.h third_party/libusb/src/libusb/libusb.h
%endif
FILE=chrome/common/channel_info_posix.cc
sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"openEuler Project"/' $FILE
%build
ulimit -n 4096
tar xf %{SOURCE20}
%ifarch %{ix86}
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
export PYTHONPATH="../../third_party/pyjson5/src:../../third_party/catapult/third_party/google-endpoints:../../xcb-proto-1.14"
echo
%if 0%{freeworld}
%build_target %{builddir} media
%else
%if %{build_headless}
%build_target %{headlessbuilddir} headless_shell
%endif
%build_target %{builddir} chrome
%build_target %{builddir} chrome_sandbox
%build_target %{builddir} chromedriver
%if %{build_clear_key_cdm}
%build_target %{builddir} clear_key_cdm
%endif
%build_target %{builddir} policy_templates
%if %{build_remoting}
%build_target %{remotingbuilddir} remoting_all
%endif
%endif
%install
rm -rf %{buildroot}
%if 0%{freeworld}
mkdir -p %{buildroot}%{chromium_path}
pushd %{builddir}
cp -a libffmpeg.so* %{buildroot}%{chromium_path}
cp -a libmedia.so* %{buildroot}%{chromium_path}
mv %{buildroot}%{chromium_path}/libffmpeg.so{,.%{lsuffix}}
mv %{buildroot}%{chromium_path}/libffmpeg.so.TOC{,.%{lsuffix}}
mv %{buildroot}%{chromium_path}/libmedia.so{,.%{lsuffix}}
mv %{buildroot}%{chromium_path}/libmedia.so.TOC{,.%{lsuffix}}
popd
%else
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{chromium_path}
cp -a %{SOURCE3} %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
chmod a+x %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
export BUILD_TARGET=`cat /etc/openEuler-release`
export CHROMIUM_PATH=%{chromium_path}
export CHROMIUM_BROWSER_CHANNEL=%{chromium_browser_channel}
sed -i "s|@@BUILD_TARGET@@|$BUILD_TARGET|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
sed -i "s|@@CHROMIUM_PATH@@|$CHROMIUM_PATH|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
sed -i "s|@@CHROMIUM_BROWSER_CHANNEL@@|$CHROMIUM_BROWSER_CHANNEL|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%if "%{chromium_channel}" == "%{nil}"
sed -i "s|@@EXTRA_FLAGS@@||g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%else
# Enable debug outputs for beta and dev channels
export EXTRA_FLAGS="--enable-logging=stderr --v=2"
sed -i "s|@@EXTRA_FLAGS@@|$EXTRA_FLAGS|g" %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh
%endif
ln -s %{chromium_path}/%{chromium_browser_channel}.sh %{buildroot}%{_bindir}/%{chromium_browser_channel}
mkdir -p %{buildroot}%{_mandir}/man1/
pushd %{builddir}
cp -a *.pak locales resources icudtl.dat %{buildroot}%{chromium_path}
%ifarch x86_64 i686 aarch64
cp -a swiftshader %{buildroot}%{chromium_path}
%endif
cp -a chrome %{buildroot}%{chromium_path}/%{chromium_browser_channel}
cp -a chrome_sandbox %{buildroot}%{chromium_path}/chrome-sandbox
cp -a ../../chrome/app/resources/manpage.1.in %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1
sed -i "s|@@PACKAGE@@|%{chromium_browser_channel}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1
sed -i "s|@@MENUNAME@@|%{chromium_menu_name}|g" %{buildroot}%{_mandir}/man1/%{chromium_browser_channel}.1
# V8 initial snapshots
# https://code.google.com/p/chromium/issues/detail?id=421063
cp -a snapshot_blob.bin %{buildroot}%{chromium_path}
cp -a v8_context_snapshot.bin %{buildroot}%{chromium_path}
cp -a xdg-mime xdg-settings %{buildroot}%{chromium_path}
cp -a MEIPreload %{buildroot}%{chromium_path}
# This is ANGLE, not to be confused with the similarly named files under swiftshader/
cp -a libEGL.so* libGLESv2.so* %{buildroot}%{chromium_path}
%if %{build_clear_key_cdm}
%ifarch i686
cp -a ClearKeyCdm/_platform_specific/linux_x86/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
%ifarch x86_64
cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
%ifarch aarch64
cp -a ClearKeyCdm/_platform_specific/linux_arm64/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
cp -a libclearkeycdm.so %{buildroot}%{chromium_path}
%endif
%endif
%endif
%endif
%if 0%{?shared}
cp -a lib*.so* %{buildroot}%{chromium_path}
cp -p %{buildroot}%{chromium_path}/libffmpeg.so{,.%{lsuffix}}
cp -p %{buildroot}%{chromium_path}/libffmpeg.so.TOC{,.%{lsuffix}}
cp -p %{buildroot}%{chromium_path}/libmedia.so{,.%{lsuffix}}
cp -p %{buildroot}%{chromium_path}/libmedia.so.TOC{,.%{lsuffix}}
%endif
# chromedriver
cp -a chromedriver %{buildroot}%{chromium_path}/chromedriver
ln -s %{chromium_path}/chromedriver %{buildroot}%{_bindir}/chromedriver
%if %{build_remoting}
# Remote desktop bits
mkdir -p %{buildroot}%{crd_path}
%if 0%{?shared}
pushd %{buildroot}%{crd_path}
for i in ../chromium-browser%{?chromium_channel}/lib*.so; do
libname=`basename $i`
ln -s $i $libname
done
popd
%endif
%endif
popd
%if %{build_remoting}
pushd %{remotingbuilddir}
# See remoting/host/installer/linux/Makefile for logic
cp -a remoting_native_messaging_host %{buildroot}%{crd_path}/native-messaging-host
cp -a remote_assistance_host %{buildroot}%{crd_path}/remote-assistance-host
cp -a remoting_locales %{buildroot}%{crd_path}/
cp -a remoting_me2me_host %{buildroot}%{crd_path}/chrome-remote-desktop-host
cp -a remoting_start_host %{buildroot}%{crd_path}/start-host
cp -a remoting_user_session %{buildroot}%{crd_path}/user-session
chmod +s %{buildroot}%{crd_path}/user-session
# chromium
mkdir -p %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts
# google-chrome
mkdir -p %{buildroot}%{_sysconfdir}/opt/chrome/
cp -a remoting/* %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts/
for i in %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts/*.json; do
sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' $i
done
mkdir -p %{buildroot}%{_sysconfdir}/opt/chrome/native-messaging-hosts
pushd %{buildroot}%{_sysconfdir}/opt/chrome/native-messaging-hosts
for i in ../../../chromium/native-messaging-hosts/*; do
# rpm gets unhappy when we symlink here
cp -a $i .
done
popd
popd
mkdir -p %{buildroot}/var/lib/chrome-remote-desktop
touch %{buildroot}/var/lib/chrome-remote-desktop/hashes
mkdir -p %{buildroot}%{_sysconfdir}/pam.d/
pushd %{buildroot}%{_sysconfdir}/pam.d/
ln -s system-auth chrome-remote-desktop
popd
%endif
%if %{build_headless}
pushd %{headlessbuilddir}
cp -a headless_lib.pak headless_shell %{buildroot}%{chromium_path}
popd
%endif
%if %{build_remoting}
cp -a remoting/host/linux/linux_me2me_host.py %{buildroot}%{crd_path}/chrome-remote-desktop
cp -a remoting/host/installer/linux/is-remoting-session %{buildroot}%{crd_path}/
mkdir -p %{buildroot}%{_unitdir}
cp -a %{SOURCE11} %{buildroot}%{_unitdir}/
sed -i 's|@@CRD_PATH@@|%{crd_path}|g' %{buildroot}%{_unitdir}/chrome-remote-desktop@.service
%endif
# Add directories for policy management
mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/managed
mkdir -p %{buildroot}%{_sysconfdir}/chromium/policies/recommended
cp -a out/Release/gen/chrome/app/policy/common/html/en-US/*.html .
cp -a out/Release/gen/chrome/app/policy/linux/examples/chrome.json .
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps
cp -a chrome/app/theme/chromium/product_logo_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
cp -a chrome/app/theme/chromium/product_logo_128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
cp -a chrome/app/theme/chromium/product_logo_64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
cp -a chrome/app/theme/chromium/product_logo_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{chromium_browser_channel}.png
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/24x24/apps
cp -a chrome/app/theme/chromium/product_logo_24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{chromium_browser_channel}.png
# Install the master_preferences file
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
install -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/%{name}/
mkdir -p %{buildroot}%{_datadir}/applications/
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE4}
install -D -m0644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml ${RPM_BUILD_ROOT}%{_datadir}/metainfo/%{chromium_browser_channel}.appdata.xml
appstream-util validate-relax --nonet ${RPM_BUILD_ROOT}%{_datadir}/metainfo/%{chromium_browser_channel}.appdata.xml
mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps/
cp -a %{SOURCE9} %{buildroot}%{_datadir}/gnome-control-center/default-apps/
mkdir -p %{buildroot}%{chromium_path}/PepperFlash
%endif
%post
if selinuxenabled; then
semanage fcontext -a -t bin_t /usr/lib/%{chromium_browser_channel} &>/dev/null || :
semanage fcontext -a -t bin_t /usr/lib/%{chromium_browser_channel}/%{chromium_browser_channel}.sh &>/dev/null || :
semanage fcontext -a -t chrome_sandbox_exec_t /usr/lib/chrome-sandbox &>/dev/null || :
restorecon -R -v %{chromium_path}/%{chromium_browser_channel} &>/dev/null || :
fi
%if %{build_remoting}
%pretrans -n chrome-remote-desktop -p <lua>
path = "/etc/opt/chrome/native-messaging-hosts"
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
%endif
%if %{shared}
%if %{freeworld}
%posttrans -n chromium-libs-media-freeworld
%{_sbindir}/update-alternatives --install \
%{_libdir}/chromium-browser/libffmpeg.so libffmpeg.so \
%{_libdir}/chromium-browser/libffmpeg.so.freeworld 20 \
--slave %{_libdir}/chromium-browser/libffmpeg.so.TOC libffmpeg.so.TOC \
%{_libdir}/chromium-browser/libffmpeg.so.TOC.freeworld \
--slave %{_libdir}/chromium-browser/libmedia.so libmedia.so \
%{_libdir}/chromium-browser/libmedia.so.freeworld \
--slave %{_libdir}/chromium-browser/libmedia.so.TOC libmedia.so.TOC \
%{_libdir}/chromium-browser/libmedia.so.TOC.freeworld
%preun -n chromium-libs-media-freeworld
if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove libffmpeg.so \
%{_libdir}/chromium-browser/libffmpeg.so.freeworld
fi
%else
%posttrans libs-media
%{_sbindir}/update-alternatives --install \
%{_libdir}/chromium-browser/libffmpeg.so libffmpeg.so \
%{_libdir}/chromium-browser/libffmpeg.so.openEuler 10 \
--slave %{_libdir}/chromium-browser/libffmpeg.so.TOC libffmpeg.so.TOC \
%{_libdir}/chromium-browser/libffmpeg.so.TOC.openEuler \
--slave %{_libdir}/chromium-browser/libmedia.so libmedia.so \
%{_libdir}/chromium-browser/libmedia.so.openEuler \
--slave %{_libdir}/chromium-browser/libmedia.so.TOC libmedia.so.TOC \
%{_libdir}/chromium-browser/libmedia.so.TOC.openEuler
%preun libs-media
if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove libffmpeg.so \
%{_libdir}/chromium-browser/libffmpeg.so.openEuler
fi
%endif
%endif
%if %{build_remoting}
%pre -n chrome-remote-desktop
getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-desktop
%post -n chrome-remote-desktop
%systemd_post chrome-remote-desktop@.service
%preun -n chrome-remote-desktop
%systemd_preun chrome-remote-desktop@.service
%postun -n chrome-remote-desktop
%systemd_postun_with_restart chrome-remote-desktop@.service
%endif
%if 0%{freeworld}
%else
%files
%doc AUTHORS
%doc chrome_policy_list.html *.json
%license LICENSE
%config %{_sysconfdir}/%{name}/
%exclude %{_sysconfdir}/%{name}/native-messaging-hosts/*
%{_bindir}/%{chromium_browser_channel}
%dir %{chromium_path}
%{chromium_path}/*.bin
%{chromium_path}/chrome_*.pak
%{chromium_path}/resources.pak
%{chromium_path}/icudtl.dat
%{chromium_path}/%{chromium_browser_channel}
%{chromium_path}/%{chromium_browser_channel}.sh
%{chromium_path}/libEGL.so*
%{chromium_path}/libGLESv2.so*
%{chromium_path}/MEIPreload/
%ifarch x86_64 i686 aarch64
%{chromium_path}/swiftshader/
%endif
%dir %{chromium_path}/PepperFlash/
%attr(4755, root, root) %{chromium_path}/chrome-sandbox
%{chromium_path}/xdg-mime
%{chromium_path}/xdg-settings
%{_mandir}/man1/%{chromium_browser_channel}.*
%{_datadir}/icons/hicolor/*/apps/%{chromium_browser_channel}.png
%{_datadir}/applications/*.desktop
%{_datadir}/metainfo/*.appdata.xml
%{_datadir}/gnome-control-center/default-apps/chromium-browser.xml
%files common
%if %{build_headless}
%{chromium_path}/headless_lib.pak
%endif
%if %{build_clear_key_cdm}
%{chromium_path}/libclearkeycdm.so
%endif
%{chromium_path}/resources/
%dir %{chromium_path}/locales/
%lang(am) %{chromium_path}/locales/am.pak*
%lang(ar) %{chromium_path}/locales/ar.pak*
%lang(bg) %{chromium_path}/locales/bg.pak*
%lang(bn) %{chromium_path}/locales/bn.pak*
%lang(ca) %{chromium_path}/locales/ca.pak*
%lang(cs) %{chromium_path}/locales/cs.pak*
%lang(da) %{chromium_path}/locales/da.pak*
%lang(de) %{chromium_path}/locales/de.pak*
%lang(el) %{chromium_path}/locales/el.pak*
%lang(en_GB) %{chromium_path}/locales/en-GB.pak*
%{chromium_path}/locales/en-US.pak*
%lang(es) %{chromium_path}/locales/es.pak*
%lang(es) %{chromium_path}/locales/es-419.pak*
%lang(et) %{chromium_path}/locales/et.pak*
%lang(fa) %{chromium_path}/locales/fa.pak*
%lang(fi) %{chromium_path}/locales/fi.pak*
%lang(fil) %{chromium_path}/locales/fil.pak*
%lang(fr) %{chromium_path}/locales/fr.pak*
%lang(gu) %{chromium_path}/locales/gu.pak*
%lang(he) %{chromium_path}/locales/he.pak*
%lang(hi) %{chromium_path}/locales/hi.pak*
%lang(hr) %{chromium_path}/locales/hr.pak*
%lang(hu) %{chromium_path}/locales/hu.pak*
%lang(id) %{chromium_path}/locales/id.pak*
%lang(it) %{chromium_path}/locales/it.pak*
%lang(ja) %{chromium_path}/locales/ja.pak*
%lang(kn) %{chromium_path}/locales/kn.pak*
%lang(ko) %{chromium_path}/locales/ko.pak*
%lang(lt) %{chromium_path}/locales/lt.pak*
%lang(lv) %{chromium_path}/locales/lv.pak*
%lang(ml) %{chromium_path}/locales/ml.pak*
%lang(mr) %{chromium_path}/locales/mr.pak*
%lang(ms) %{chromium_path}/locales/ms.pak*
%lang(nb) %{chromium_path}/locales/nb.pak*
%lang(nl) %{chromium_path}/locales/nl.pak*
%lang(pl) %{chromium_path}/locales/pl.pak*
%lang(pt_BR) %{chromium_path}/locales/pt-BR.pak*
%lang(pt_PT) %{chromium_path}/locales/pt-PT.pak*
%lang(ro) %{chromium_path}/locales/ro.pak*
%lang(ru) %{chromium_path}/locales/ru.pak*
%lang(sk) %{chromium_path}/locales/sk.pak*
%lang(sl) %{chromium_path}/locales/sl.pak*
%lang(sr) %{chromium_path}/locales/sr.pak*
%lang(sv) %{chromium_path}/locales/sv.pak*
%lang(sw) %{chromium_path}/locales/sw.pak*
%lang(ta) %{chromium_path}/locales/ta.pak*
%lang(te) %{chromium_path}/locales/te.pak*
%lang(th) %{chromium_path}/locales/th.pak*
%lang(tr) %{chromium_path}/locales/tr.pak*
%lang(uk) %{chromium_path}/locales/uk.pak*
%lang(vi) %{chromium_path}/locales/vi.pak*
%lang(zh_CN) %{chromium_path}/locales/zh-CN.pak*
%lang(zh_TW) %{chromium_path}/locales/zh-TW.pak*
%if %{build_headless}
%files headless
%{chromium_path}/headless_shell
%endif
%if 0%{?shared}
%files libs
%exclude %{chromium_path}/libffmpeg.so*
%exclude %{chromium_path}/libmedia.so*
%{chromium_path}/lib*.so*
%endif
%if %{build_remoting}
%files -n chrome-remote-desktop
%{crd_path}/chrome-remote-desktop
%{crd_path}/chrome-remote-desktop-host
%{crd_path}/is-remoting-session
%if 0%{?shared}
%{crd_path}/lib*.so
%endif
%{crd_path}/native-messaging-host
%{crd_path}/remote-assistance-host
%{_sysconfdir}/pam.d/chrome-remote-desktop
%{_sysconfdir}/chromium/native-messaging-hosts/*
%{_sysconfdir}/opt/chrome/
%{crd_path}/remoting_locales/
%{crd_path}/start-host
%{crd_path}/user-session
%{_unitdir}/chrome-remote-desktop@.service
/var/lib/chrome-remote-desktop/
%endif
%files -n chromedriver
%doc AUTHORS
%license LICENSE
%{_bindir}/chromedriver
%{chromium_path}/chromedriver
%endif
%if 0%{?shared}
%if %{freeworld}
%files -n chromium-libs-media-freeworld
%else
%files libs-media
%endif
%{chromium_path}/libffmpeg.so.%{lsuffix}*
%{chromium_path}/libffmpeg.so.TOC.%{lsuffix}*
%{chromium_path}/libmedia.so.%{lsuffix}*
%{chromium_path}/libmedia.so.TOC.%{lsuffix}*
%endif
%changelog
* Mon Dec 30 2020 Jeffery.Gao <gaojianxing@huawei.com> - %{majorversion}.0.4280.88-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。