# eu-strip crashes on chrome binary from this build %define _enable_debug_packages %{nil} %global debug_package %{nil} %global __debug_install_post %{nil} %global use_clang 0 %global system_icu 1 %global system_openjpeg 1 %global system_libtiff 1 %global system_libvpx 1 %global system_dav1d 1 # libaom is not actually used (even if configured in gn_config) %global system_libaom 1 # system libevent causes the renderer to get stuck %global system_libevent 0 %if %{system_icu} %define gn_icu icu %endif %if %{system_libvpx} %define gn_libvpx libvpx %endif %if %{system_libaom} %define gn_libaom libaom %endif %if %{system_dav1d} %define gn_dav1d dav1d %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 %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 %define google_default_client_id 1039996407057-q599ngv7i6ni4sbkd2fsns30246r9s9v.apps.googleusercontent.com %define google_default_client_secret mRHXPjlS4cLpp1beCiXoYbLZ Name: chromium-browser-stable Version: 79.0.3945.79 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 Source4: widevine_cdm_version.h.in # from gentoo: compiler setup Patch1: chromium-compiler-r4.patch # fix googleisms in man page Patch2: chromium-mageia.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) fix build with current glib... Patch36: chromium-58-glib.patch # (cjw) use system nodejs to fix build Patch37: chromium-58-system-nodejs.patch # (cjw) redefined macro Patch40: chromium-59-gcc5.patch # (cjw) fix coding errors resulting in gcc 7 warning Patch54: chromium-62-gcc7.patch # (cjw) fix gcc errors and warnings Patch177: chromium-64-gcc7.patch # (cjw) fix even more gcc warnings Patch179: chromium-65-gcc7.patch # (cjw) fix yet mmore gcc warnings Patch182: chromium-66-gcc7.patch # (cjw) fix a few more gcc warnings Patch184: chromium-67-gcc7.patch # (cjw) more gcc warnings Patch186: chromium-68-gcc7.patch # (cjw) moore gcc warnings Patch188: chromium-68-gcc8.patch # (cjw) and more gcc warnings Patch189: chromium-69-gcc7.patch # (cjw) fix gn bootstrapping with gcc Patch190: chromium-69-gn-bootstrap.patch # (cjw) moooore gcc warnings Patch192: chromium-70-gcc8.patch # (cjw) build fixes for 64-bit arm Patch193: chromium-70-aarch64.patch # (joequant) fix crash on cinnamon Patch194: chromium-69-cinnamon.patch # (cjw) gn bootstrap fix Patch195: chromium-72-gn-bootstrap.patch # (cjw) yet more gcc warnings Patch196: chromium-72-gcc8.patch # (cjw) use system closure compiler Patch197: chromium-72-system-closure-compiler.patch # (cjw) fix i586 build Patch198: chromium-72-i586.patch # (cjw) some more gcc warnings Patch199: chromium-73-gcc8.patch # (cjw) gcc warnings Patch200: chromium-74-gcc8.patch # (cjw) gcc warnings Patch201: chromium-75-gcc8.patch # (cjw) fixes for gcc warnings that do not work with clang %if !%{use_clang} Patch203: chromium-75-gcc-only.patch %endif # (cjw) gcc warnings Patch205: chromium-76-gcc8.patch # (cjw) system zlib build fix Patch206: chromium-77-system-zlib.patch # (cjw) gcc warnings Patch207: chromium-77-gcc9.patch # (cjw) fix build with system icu Patch209: chromium-77-system-icu.patch # (cjw) fixes for gcc warnings that do not work with clang %if !%{use_clang} Patch211: chromium-77-gcc-only.patch %endif # (cjw) force use of python2, since python3 does not work Patch215: chromium-77-python2.patch # (cjw) gcc warnings Patch216: chromium-78-gcc.patch Patch218: chromium-78-icu-65.patch # (cjw) support using system libaom Patch219: chromium-79-system-libaom.patch # (cjw) gcc warnings Patch220: chromium-79-gcc.patch %if !%{use_clang} # fixes for gcc warnings that do not work with clang Patch221: chromium-79-gcc-only.patch %endif # fix compilation of base/bind.h with gcc in C++14 mode for components/services/leveldb/leveldb_database_impl.cc Patch222: chromium-79-528e9a3e1f25bd264549c4c7779748abfd16bb1c.patch # fix compilation of third_party/blink/public/platform/web_theme_engine.h after third_party/blink/public/common/css/forced_colors.h Patch223: chromium-79-forcedcolors.patch # (cjw) support using system dav1d Patch224: chromium-79-system-dav1d.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) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) 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) 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/common/extensions/docs/ rm -r --interactive=never chrome/test/data/{android,app_shim,apptest,ash,autofill,automation,automation_proxy_snapshot,banners,bookmark_html_reader,bookmarks,captive_portal,chromedriver,chrome_endure,chromeos,click_modifier,components,constrained_files,content,content_setting_bubble,devtools,diagnostics,dom_automation,dom_checker,dom_distiller,downloads,drive_first_run,dromaeo,durable,edge_database_reader,edge_profile,encoding_tests,extensions,fast_shutdown,fast_tab_close,favicon,feeds,file_select_helper,find_in_page,firefox320_profile,firefox35_profile,firefox3_nss,firefox3_nss_mac,firefox3_profile,firefox_profile,firefox_searchplugins,focus,frame_dom_access,frame_tree,ftp,fullscreen_mouselock,geolocation,google,gpu,History,image_decoding,image_search,import,indexeddb,inspector,installer,interstitial_page,login,native_messaging,navigation_interception,notifications,page_cycler,page_load_metrics,password,pdf,pepper,perf,permissions,plugin_power_saver,policy,popup_blocker,predictor,prefs,pref_service,prerender,printing,profiles,push_messaging,referrer_policy,safe_browsing,save_page,scroll,session_history,session_restore,sessions,settings,speech,ssl,subresource_filter,sunspider,sync,template_url_scraper,textinput,third_party,top_sites,translate,unit,v8_benchmark_v6,viewsource,web_app_info,webrtc,websocket,webui_test_resources.grd,whitelists,workers} 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/settings/chromeos rmdir chrome/test/data/webui/{engagement,extensions,print_preview,settings,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/binutils/ 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 %if %{system_libaom} rm -r --interactive=never third_party/libaom/source %endif %if %{system_dav1d} rm -r --interactive=never third_party/dav1d/{libdav1d,version} %endif rm -r --interactive=never third_party/libjpeg/*.[ch] 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/yasm/source/ 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 -r --interactive=never third_party/pdfium/third_party/eu-strip 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 rm -r --interactive=never third_party/pdfium/third_party/yasm/source rm --interactive=never third_party/swiftshader/third_party/PowerVR_SDK/Utilities/Filewrap/Windows_x86_32/Filewrap.exe 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 third_party/chromite/lib/datafiles 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 -r --interactive=never third_party/sfntly/src/java/lib 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 -r --interactive=never third_party/cacheinvalidation/src/example-app-build/libs rm --interactive=never third_party/closure_compiler/compiler/compiler.jar rm -r --interactive=never third_party/sfntly/src/cpp/ext rm --interactive=never third_party/bazel/desugar/Desugar-runtime.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/blink/renderer/devtools/scripts/closure/compiler.jar rm --interactive=never third_party/blink/renderer/devtools/scripts/closure/closure_runner/closure_runner.jar rm --interactive=never third_party/blink/renderer/devtools/scripts/jsdoc_validator/jsdoc_validator.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 %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 system_gn_list ffmpeg flac libwebp libxml libxslt snappy yasm %{?gn_libvpx} libpng %{?gn_icu} zlib jsoncpp opus libdrm %{?gn_libaom} %{?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 \ binutils_path="%{_bindir}" \ 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 \ 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 \ 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 \ google_api_key="%{google_api_key}" \ google_default_client_id="%{google_default_client_id}" \ google_default_client_secret="%{google_default_client_secret}" # enable_browser_cdms=true \ build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list} third_party/libaddressinput/chromium/tools/update-strings.py %setup_compile_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} -fuse-ld=gold"; export LD # 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" %endif %ifarch %ix86 LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped" %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 pushd out/Release 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}%{_crdir}/default_apps 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/natives_blob.bin %{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 chrome/browser/resources/default_apps/* %{buildroot}%{_crdir}/default_apps/ 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}/natives_blob.bin %{_crdir}/snapshot_blob.bin %{_crdir}/resources.pak %{_crdir}/resources %{_crdir}/chrome_100_percent.pak %{_crdir}/chrome_200_percent.pak %{_crdir}/mksnapshot %{_crdir}/themes %{_crdir}/default_apps %{_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