# eu-strip crashes on chrome binary from this build %define _enable_debug_packages 0 %global debug_package %{nil} %global __debug_install_post %{nil} %global use_clang 0 %global use_gold 0 %global warnings_as_errors 0 %global system_icu 1 %global system_openjpeg 1 %global system_libtiff 1 %global system_libvpx 0 %global system_dav1d 1 %global system_re2 1 %global system_fontconfig 1 # system libevent causes the renderer to get stuck %global system_libevent 0 %if %{use_gold} %define gn_gold use_gold=true %else %define gn_gold use_gold=false %endif %if %{system_icu} %define gn_icu icu %endif %if %{system_libvpx} %define gn_libvpx libvpx %endif %if %{system_dav1d} %define gn_dav1d dav1d %endif %if %{system_re2} %define gn_re2 re2 %endif %if %{system_fontconfig} %define gn_fontconfig fontconfig %endif %if %{system_libevent} %define gn_libevent libevent %endif %if %{use_clang} %define gn_clang is_clang=true %else %define gn_clang is_clang=false %endif %if %{warnings_as_errors} %else %define gn_warnings_as_errors treat_warnings_as_errors=false %endif %define crname chromium-browser %define _crdir %{_libdir}/%{crname} %define __requires_exclude_from ^%{_crdir}/libwidevinecdmadapter.so$ # eol 'fix' corrupts some .bin %define dont_fix_eol 1 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys # Note: these are for Mageia use ONLY. # For your own builds, please get your own set of keys. %define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU Name: chromium-browser-stable Version: 89.0.4389.114 Release: %mkrel 1 Summary: A fast webkit-based web browser Group: Networking/WWW License: BSD, LGPL URL: http://www.chromium.org/Home # http://omahaproxy.appspot.com/ # http://googlechromereleases.blogspot.com/ Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz Source1: chromium-wrapper Source2: chromium-browser.desktop Source3: pkg_resources.tar.gz # from gentoo: compiler setup Patch1: chromium-compiler-r4.patch # fix googleisms in man page Patch2: chromium-mageia.patch # (ns80) use a patch rather than a source file for widevine Patch3: chromium-71.0.3578.98-widevine-r3.patch # (ns80) remove unrar Patch4: chromium-norar.patch # (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. Patch6: chromium-55-extra-media.patch # (cjw) [1/2] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos Patch7: chromium-40-wmvflvmpg.patch # (cjw) [2/2] Handle more video codecs. Patch8: chromium-40-sorenson-spark.patch # (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example Patch10: chromium-45-no-external-components.patch # (debian) disable third party cookies by default Patch11: chromium-third-party-cookies-off-by-default.patch # (cjw) fix build error due to android-specific code Patch19: chromium-50-codec-warnings.patch # (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs" Patch22: chromium-54-proprietary-codecs-assert.patch # (cjw) disable werror for a compilation warning that causes the build to fail Patch23: chromium-53-bignum-werror-fix.patch # (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch # (cjw) link several libraries directly instead of loading them using dlopen() Patch27: chromium-53-link-libgio-libpci-libudev-libbrlapi.patch # (cjw) add missing unbundle gn files (1) Patch28: chromium-53-gn-system-icu-jsoncpp.patch # (cjw) add missing unbundle gn files (2) Patch29: chromium-53-gn-system-opus.patch %if %{system_libtiff} # (cjw) build pdfium with system libtiff Patch30: chromium-52-pdfium-system-libtiff-libpng.patch %endif %if %{system_openjpeg} # (cjw) fix pdfium build with system openjpeg Patch31: chromium-74-pdfium-system-libopenjpeg2.patch %endif # (cjw) system libvpx Patch32: chromium-60-system-libvpx.patch # (cjw) fix build with current glib... Patch36: chromium-58-glib.patch # (cjw) use system nodejs to fix build Patch37: chromium-58-system-nodejs.patch # (cjw) use system closure compiler Patch38: chromium-72-system-closure-compiler.patch # (cjw) fix build with system icu Patch39: chromium-77-system-icu.patch # (cjw) force use of python2, since python3 does not work Patch40: chromium-77-python2.patch # (cjw) support using system dav1d Patch41: chromium-79-system-dav1d.patch # (cjw) gcc errors: redefined macros Patch80: chromium-gcc-macro-redefined.patch # (cjw) gcc errors: include files Patch81: chromium-gcc-includes.patch # (cjw) gcc warnings: suggested parentheses Patch82: chromium-gcc-parentheses.patch # (cjw) gcc warnings: unused variables or functions Patch83: chromium-gcc-unused.patch # (cjw) gcc warnings: missing casts Patch84: chromium-gcc-type-errors.patch # (cjw) gcc errors: multiple character literals Patch85: chromium-gcc-character-literals.patch # (cjw) gcc constexpr problems Patch87: chromium-gcc-constexpr.patch # (cjw) gcc anonymous namespace problems Patch88: chromium-gcc-anonymous-namespace.patch # (cjw) gcc noexcept problems Patch89: chromium-gcc-noexcept.patch # (cjw) gcc warnings: variable assigned in own assignment rhs Patch90: chromium-gcc-double-assignment.patch # (cjw) gcc warnings: optional constructs Patch91: chromium-gcc-optional.patch # (cjw) gcc warnings: uninitialized variables Patch92: chromium-gcc-uninitialized.patch # (cjw) gcc - unclear... Patch93: chromium-gcc-unsorted.patch # (cjw) gcc disabled warnings %if !%{use_clang} Patch94: chromium-gcc-disabled-warnings.patch %endif # (cjw) alignment problems Patch188: chromium-68-gcc8.patch # (cjw) fix gn bootstrapping with gcc Patch190: chromium-69-gn-bootstrap.patch # (cjw) build fixes for 64-bit arm Patch193: chromium-70-aarch64.patch # (cjw) gn bootstrap fix Patch195: chromium-72-gn-bootstrap.patch # (cjw) fix i586 build Patch198: chromium-72-i586.patch # (cjw) fix build with system zlib Patch240: chromium-85-system-zlib.patch # (cjw) fix angle-vulkan build with system zlib Patch243: chromium-87-system-zlib.patch # (cjw) fix broken system libvpx build Patch244: chromium-88-system-libvpx.patch # (cjw) fix i586 build Patch248: chromium-87-i586.patch # https://github.com/schnitzeltony/meta-browser/blob/master/recipes-browser/chromium/files/0003-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch Patch249: 0003-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch Provides: %{crname} Obsoletes: chromium-browser-unstable < 26.0.1410.51 Obsoletes: chromium-browser-beta < 26.0.1410.51 Obsoletes: chromium-browser < 1:9.0.597.94 BuildRequires: bison BuildRequires: flex BuildRequires: gperf %if %{system_icu} BuildRequires: icu %endif BuildRequires: ninja BuildRequires: python2 BuildRequires: yasm BuildRequires: bzip2-devel #BuildRequires: closure-compiler BuildRequires: cups-devel BuildRequires: elfutils-devel BuildRequires: ffmpeg-devel BuildRequires: glib2-devel BuildRequires: gtk3-devel BuildRequires: libatomic-devel %if %{system_libevent} BuildRequires: libevent-devel %endif BuildRequires: libmesagl-devel BuildRequires: libpam-devel BuildRequires: libpulseaudio-devel BuildRequires: mesaglesv2-devel %if %mgaver >= 6 BuildRequires: nodejs %endif BuildRequires: osmesa-devel #BuildRequires: protobuf-devel BuildRequires: snappy-devel BuildRequires: perl(Switch) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(atk) %if %{system_dav1d} BuildRequires: pkgconfig(dav1d) %endif BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(flac) %if %{system_fontconfig} BuildRequires: pkgconfig(fontconfig) %endif BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(gnome-keyring-1) BuildRequires: pkgconfig(gnutls) %if %mgaver >= 7 BuildRequires: pkgconfig(harfbuzz) %endif %if %{system_icu} BuildRequires: pkgconfig(icu-i18n) %endif BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libopenjp2) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(libpng) %if %{system_libtiff} BuildRequires: pkgconfig(libtiff-4) %endif BuildRequires: pkgconfig(libusb-1.0) %if %{system_libvpx} BuildRequires: pkgconfig(libvpx) %endif BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(minizip) BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(opus) %if %{system_re2} BuildRequires: pkgconfig(re2) %endif BuildRequires: pkgconfig(speech-dispatcher) BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(udev) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(zlib) %if %{use_clang} BuildRequires: clang %endif # Unused but building gn wants it to be present BuildRequires: pkgconfig(gconf-2.0) BuildRequires: git ExclusiveArch: i586 x86_64 # aarch64 does not build without fewer than default parallel jobs config # armv5tl armv7hl %description Chromium is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. For certain media playback features - AAC decoding - this package currently assumes decoder support is available, while that is only true if the 'tainted' variety of the libavcodec package is installed. When the 'core' variety of libavcodec is installed, chromium may output noise for AAC audio. %ifarch %{ix86} The i586 build of this package does not work on machines that do not support the SSE2 instruction set extension. %endif %package -n chromium-browser Summary: A fast webkit-based web browser (transition package) Epoch: 1 Group: Networking/WWW Requires: %{name} = %{version}-%{release} %description -n chromium-browser Chromium is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. This is a transition package that installs the stable channel Chromium browser. %prep %setup -q -n chromium-%{version} %autopatch -p1 # files we do not want from upstream source bundles rm -r --interactive=never third_party/breakpad/breakpad/src/processor/testdata/ rm -r --interactive=never third_party/breakpad/breakpad/src/tools rm -r --interactive=never chrome/test/data/{android,app_shim,apptest,ash,autofill,automation,automation_proxy_snapshot,banners,bookmark_html_reader,bookmarks,captive_portal,chromedriver,chrome_endure,chromeos,click_modifier,components,constrained_files,content,content_setting_bubble,devtools,diagnostics,dom_automation,dom_checker,dom_distiller,downloads,drive_first_run,dromaeo,durable,edge_database_reader,edge_profile,encoding_tests,extensions,fast_shutdown,fast_tab_close,favicon,feeds,file_select_helper,find_in_page,firefox320_profile,firefox35_profile,firefox3_nss,firefox3_nss_mac,firefox3_profile,firefox_profile,firefox_searchplugins,focus,frame_dom_access,frame_tree,ftp,fullscreen_mouselock,geolocation,google,gpu,History,image_decoding,image_search,import,indexeddb,inspector,installer,interstitial_page,login,native_messaging,navigation_interception,notifications,page_cycler,page_load_metrics,password,pepper,perf,permissions,plugin_power_saver,policy,popup_blocker,predictor,prefs,pref_service,prerender,printing,profiles,push_messaging,referrer_policy,safe_browsing,save_page,scroll,session_history,session_restore,sessions,settings,speech,ssl,subresource_filter,sunspider,sync,template_url_scraper,textinput,third_party,top_sites,translate,unit,v8_benchmark_v6,viewsource,web_app_info,webrtc,websocket,webui_test_resources.grd,workers} rm -r --interactive=never chrome/test/data/nacl/{pnacl_error_handling,cross_origin,irt_exception,pnacl_request_header,nonsfi,pnacl_url_loader,pnacl_hw_eh_disabled,pnacl_nmf_options,pnacl_dyncode_syscall_disabled,extension_mime_handler,ppapi_test_lib,bad,ppapi,manifest,pnacl_debug_url,extension_validation_cache,exit_status,progress_events,manifest_file,sysconf_nprocessors_onln,crash,pnacl_mime_type} rmdir chrome/test/data/webui/{settings,extensions}/a11y rmdir chrome/test/data/webui/settings/chromeos/app_management rmdir chrome/test/data/webui/{engagement,extensions,history,net_internals} rm -r --interactive=never components/test/data/update_client/jebgalgnebhfojomionfpkfelancnnkf/component1.dll rm -r --interactive=never content/test/data/ rm -r --interactive=never ppapi/native_client/tests/ rm -r --interactive=never third_party/apache-win32/ rm -r --interactive=never third_party/expat/{fuzz,include,src} rm -r --interactive=never third_party/ffmpeg/*/* rm -r --interactive=never third_party/flac/{include,src} %if %{system_icu} rm -r --interactive=never third_party/icu/{android,android_small,common,patches,source,chromeos,ios} %endif rm -r --interactive=never third_party/jsoncpp/source rm -r --interactive=never third_party/lcov %if %{system_libevent} rm -r --interactive=never base/third_party/libevent/*/* rm -r --interactive=never base/third_party/libevent/*.[ch] %endif %if %{system_libvpx} rm -r --interactive=never third_party/libvpx/source/{libvpx,config} %endif rm -r --interactive=never third_party/libaom/source %if %{system_dav1d} rm -r --interactive=never third_party/dav1d/{libdav1d,version} %endif rm -r --interactive=never third_party/libjpeg_turbo/*.[ch] rm -r --interactive=never third_party/libpng/*.[ch] rm -r --interactive=never third_party/libxslt/{linux,mac,src,win32} rm -r --interactive=never third_party/xdg-utils/tests/ rm -r --interactive=never third_party/zlib/{*.[ch],contrib/minizip} rm -r --interactive=never native_client_sdk/src/tools/lib/tests/data rm -r --interactive=never buildtools/third_party/eu-strip/bin rm --interactive=never third_party/pdfium/third_party/libopenjpeg20/*.[ch] rm -r --interactive=never third_party/pdfium/third_party/libpng16 %if %{system_libtiff} rm --interactive=never third_party/pdfium/third_party/libtiff/*.[ch] %endif %if %{system_re2} rm -r --interactive=never third_party/re2/src %endif %if %{system_fontconfig} rm -r --interactive=never third_party/fontconfig/{src,include,chromium} %endif rm --interactive=never native_client/tools/redirector.exe rm --interactive=never third_party/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe rm -r --interactive=never third_party/llvm rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-Gerbera.exe rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-PVRSDK.exe rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/libGLES_CM.dll rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/bob/bob rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/glut/SanOGLES rm --interactive=never third_party/lzma_sdk/Executable/7za.exe rm --interactive=never third_party/lzma_sdk/7zr.exe rm --interactive=never third_party/breakpad/symupload.exe rm -r --interactive=never third_party/catapult/third_party/google-endpoints/setuptools rm -r --interactive=never third_party/catapult/third_party/vinn/third_party/v8 rm --interactive=never third_party/depot_tools/ninja.exe rm --interactive=never third_party/depot_tools/ninja-linux32 rm --interactive=never third_party/depot_tools/ninja-linux64 rm -r --interactive=never native_client/tools/hermetic_cygwin rm -r --interactive=never base/test/data/pe_image/ rm -r --interactive=never base/test/data/file_version_info_unittest rm -r --interactive=never chrome/chrome_cleaner/test/resources/signed_dll rm --interactive=never third_party/crashpad/crashpad/handler/win/z7_test.dll rm -r --interactive=never third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus rm -r --interactive=never third_party/boringssl/src/util/ar/testdata rm -r --interactive=never third_party/pyelftools/test/testfiles_for_unittests rm -r --interactive=never third_party/pyelftools/test/external_tools rm -r --interactive=never third_party/pyelftools/test/testfiles_for_readelf rm -r --interactive=never third_party/pyelftools/examples rm -r --interactive=never third_party/skia/platform_tools/android/bin rm --interactive=never third_party/nasm/travis/test/tmap.o.t rm -r --interactive=never components/test/data/update_client rm -r --interactive=never build/android/tests/symbolize rm --interactive=never third_party/skia/platform_tools/android/apps/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/libphonenumber/dist/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar rm --interactive=never third_party/libphonenumber/dist/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar rm -r --interactive=never third_party/libphonenumber/dist/java/demo/war/WEB-INF/lib rm -r --interactive=never third_party/libphonenumber/dist/java/lib rm --interactive=never third_party/webrtc/examples/androidapp/third_party/autobanh/lib/autobanh.jar rm --interactive=never third_party/closure_compiler/compiler/compiler.jar rm --interactive=never third_party/flatbuffers/src/android/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/flatbuffers/src/samples/android/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/gradle_wrapper/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/webgl/src/conformance-suites/2.0.0/deqp/compiler.jar rm --interactive=never third_party/jetifier_standalone/lib/jetifier-standalone.jar rm --interactive=never third_party/grpc/src/examples/android/helloworld/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/grpc/src/src/android/test/interop/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/android_deps/local_modifications/androidx_preference_preference/androidx_preference_preference_java.jar rm --interactive=never third_party/android_deps/local_modifications/androidx_fragment_fragment/androidx_fragment_fragment_java.jar rm --interactive=never third_party/tflite/src/tensorflow/lite/java/ovic/demo/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/tflite/src/tensorflow/lite/java/demo/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/tflite/src/tensorflow/examples/android/gradle/wrapper/gradle-wrapper.jar rm --interactive=never third_party/checkstyle/checkstyle-all.jar rm --interactive=never build/android/stacktrace/java_deobfuscate.jar %if %{system_libevent} find base/third_party/libevent -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete %endif %if %{system_icu} # Remove bundled ICU; its header files appear to get picked up instead of # the system ones, leading to errors during the final link stage. # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q find third_party/icu -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete %endif # Hard code extra version FILE=chrome/common/channel_info_posix.cc sed -i.orig -re 's/char\s*\*(.*)getenv\("CHROME_VERSION_EXTRA"\)/char const *\1"%{product_vendor} %{product_version}"/' $FILE if diff -u $FILE $FILE.orig >/dev/null; then exit 1 fi # version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1 " (version:" #define widevine_version 1.4.8.1008 #for chrome_arch in ia32 x64; do # mkdir -p third_party/widevine/cdm/linux/${chrome_arch} # sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h #done %build %define unbundle_list ffmpeg flac %{?gn_fontconfig} libwebp libxml libxslt snappy %{?gn_libvpx} libpng %{?gn_icu} zlib jsoncpp opus %{?gn_re2} libdrm %{?gn_dav1d} %{?gn_libevent} # handled by upstream regular build scripts: freetype harfbuzz-ng # mesa # v NO TABS IN HERE! %define gn_config use_sysroot=false \ system_libdir="%{_lib}" \ icu_use_data_file=true \ enable_nacl=false \ is_nacl_glibc=false \ linux_use_bundled_binutils=false \ custom_toolchain="//build/toolchain/linux/unbundle:default" \ host_toolchain="//build/toolchain/linux/unbundle:default" \ proprietary_codecs=true \ linux_link_libudev = true \ linux_link_libspeechd = true \ linux_link_libbrlapi = true \ linux_link_xlib = true \ enable_platform_ac3_eac3_audio = true \ enable_mse_mpeg2ts_stream_parser=true \ enable_platform_hevc=true \ use_system_libjpeg=true \ use_system_libopenjpeg2=true \ use_libjpeg_turbo=false \ enable_widevine=true \ pdf_enable_xfa=true \ gtk_version=3 \ fatal_linker_warnings=false \ use_libpci = true \ use_pulseaudio=true \ use_allocator="none" \ is_debug=false \ %{?gn_clang} \ clang_use_chrome_plugins=false \ use_lld=false \ %{?gn_gold} \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libpng=true \ enable_dav1d_decoder=true enable_libaom_decoder=false \ use_custom_libcxx=false \ closure_compile=false \ enable_mojom_closure_compile=false \ enable_js_type_check=false \ %{?gn_warnings_as_errors} \ google_api_key="%{google_api_key}" # enable_browser_cdms=true \ build/linux/unbundle/replace_gn_files.py --system-libraries %{unbundle_list} third_party/libaddressinput/chromium/tools/update-strings.py %set_build_flags %if %{use_clang} CC=clang; export CC CXX=clang++; export CXX %else CC=%{__cc}; export CC CXX=%{__cxx}; export CXX %endif AR=%{__ar}; export AR NM=%{__nm}; export NM LD="%{__cxx}"; export LD %if %{use_gold} LD="$LD -fuse-ld=gold" %endif # filter out -g from CFLAGS and CXXFLAGS to fix builds CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //') CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //') CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes" %if %{use_clang} CFLAGS="$CFLAGS -Wno-error=unused-result" CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-declarations" %else CXXFLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-error=unknown-pragmas -Wno-error=array-bounds -Wno-return-type -std=gnu++17" %endif %ifarch %ix86 %if %{use_gold} LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped" %endif %endif %ifarch %{ix86} CFLAGS="$CFLAGS -msse2" CXXFLAGS="$CXXFLAGS -msse2" %endif python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' out/Release/gn gen --script-executable=/usr/bin/python2 --args='%{gn_config}' out/Release # python... mkdir out/Release/python2_root cp -r %{python3_sitelib}/xcbgen out/Release/python2_root/ cp -r %{python3_sitelib}/setuptools out/Release/python2_root/ pushd out/Release/python2_root/ tar xf %{SOURCE3} popd %if !%{use_gold} # ld.bfd needs lots of file descriptors to link chrome ulimit -n 4096 %endif pushd out/Release env PYTHONPATH=${PWD}/python2_root ninja %{_smp_mflags} chrome chrome_sandbox popd # man page sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1 %install ls out/Release mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_crdir}/locales mkdir -p %{buildroot}%{_crdir}/themes mkdir -p %{buildroot}%{_mandir}/man1 install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1 install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/ install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/ install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/ install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/ install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/ install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/ install -m 755 out/Release/libEGL.so %{buildroot}%{_crdir}/ install -m 755 out/Release/libGLESv2.so %{buildroot}%{_crdir}/ ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} %ifarch %{ix86} x86_64 mkdir -p %{buildroot}%{_crdir}/swiftshader install -m 755 out/Release/swiftshader/*.so %{buildroot}%{_crdir}/swiftshader/ %endif find out/Release/resources/ -name "*.d" -exec rm {} \; cp -r out/Release/resources %{buildroot}%{_crdir} # desktop file mkdir -p %{buildroot}%{_datadir}/applications install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ %if %{system_icu} # symlink to ICU data file ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/') ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/') ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat) ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat %else install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/ %endif # icon for i in 22_mono 24 32 48 64 128 256; do mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps if [ -f chrome/app/theme/chromium/product_logo_$i.png ]; then install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png else install -m 644 chrome/app/theme/chromium/linux/product_logo_$i.xpm \ %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.xpm fi done %files -n chromium-browser %files %{_bindir}/%{crname} %dir %{_crdir} %{_crdir}/chromium-wrapper %{_crdir}/chrome %attr(4755,root,root) %{_crdir}/chrome-sandbox %{_crdir}/icudtl.dat %{_crdir}/locales %{_crdir}/snapshot_blob.bin %{_crdir}/resources.pak %{_crdir}/resources %{_crdir}/chrome_100_percent.pak %{_crdir}/chrome_200_percent.pak %{_crdir}/mksnapshot %{_crdir}/themes %{_crdir}/libEGL.so %{_crdir}/libGLESv2.so %ifarch %{ix86} x86_64 %{_crdir}/swiftshader %endif %{_crdir}/v8_context_snapshot.bin %{_mandir}/man1/%{crname}* %{_datadir}/applications/*.desktop %{_iconsdir}/hicolor/*/apps/%{crname}.png %{_iconsdir}/hicolor/*/apps/%{crname}.xpm