2018-04-24 14:28:44 +03:00
# This spec file is based on other spec files, ebuilds, PKGBUILDs available from
# [1] https://repos.fedorapeople.org/repos/spot/chromium/
# [2] https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-tested/
# [3] https://www.archlinux.org/packages/extra/x86_64/chromium/
# [4] https://src.fedoraproject.org/rpms/chromium/
# [5] https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/
2019-09-21 23:02:43 +03:00
# [6] https://packages.altlinux.org/ru/sisyphus/specfiles/chromium-gost
2018-04-24 14:28:44 +03:00
2018-11-11 01:39:53 +03:00
# Get the version number of latest stable version
# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
2018-04-24 14:28:44 +03:00
2014-11-24 14:25:53 +03:00
%global _build_pkgcheck_set %{nil}
2019-09-21 23:02:43 +03:00
%bcond_without gost
2014-11-24 10:50:36 +03:00
2015-11-11 18:16:42 +03:00
# eol 'fix' corrupts some .bin
%define dont_fix_eol 1
2016-02-25 12:05:16 +03:00
%define _disable_lto 1
2015-11-11 18:16:42 +03:00
2012-07-04 11:57:27 +04:00
%define crname chromium-browser
%define _crdir %{_libdir}/%{crname}
%define _src %{_topdir}/SOURCES
2018-11-11 01:39:53 +03:00
%define ffmpeg 1
2016-03-08 19:43:38 +03:00
%define icu 0
2018-11-11 01:39:53 +03:00
%define libva 0
2018-04-24 14:28:44 +03:00
%define clang 1
2018-05-28 14:04:45 +03:00
%define jsoncpp 0
2015-02-09 22:50:26 +03:00
2016-11-17 23:12:20 +10:00
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
2018-11-11 01:39:53 +03:00
# 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
2016-11-17 23:12:20 +10:00
2019-09-21 23:02:43 +03:00
# GOST patches and sources
2019-11-14 01:20:39 +03:00
%define chromium_gost_commit 92271f5a4787c2551b2dd39a4c8eda4cf56f5ea0
2019-10-31 23:21:09 +03:00
%define msspi_commit c9939360e68a55da613ac8cd0495c6d7022a6ce7
2019-09-21 23:02:43 +03:00
%define _gostsourcedir %{_builddir}/chromium-gost
2019-09-22 15:31:34 +03:00
%if %{with gost}
# When building libgostssl.so, we make empty fake libcapi10.so* and libcapi20.so*
# to emulate linking with proprietary CryptoPro libraries; at runtime Chromium
# tries to dlopen libgostssl.so and, if libcapi* libs are missing, it will simply
# not load this library and will not fail with an error. So, we don't need to depend
# from these libraries, especially because we can't put them into the repository.
%define __noautoreq 'libcapi.*\.so\.*'
%endif
2015-06-22 21:51:15 +10:00
Summary : A fast web browser based on the Blink engine
Name : chromium-browser-stable
2019-11-25 21:23:05 +03:00
Version : 78.0.3904.108
2019-10-31 23:21:09 +03:00
Release : 1
2015-06-22 21:51:15 +10:00
License : BSD, LGPL
Group : Networking/WWW
2017-01-31 10:51:58 +03:00
Url : https://www.chromium.org/Home
2015-06-22 21:51:15 +10:00
Source0 : https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version} .tar.xz
Source1 : chromium-wrapper
2019-09-21 23:02:43 +03:00
Source2 : %{crname} .desktop
2016-11-17 23:12:20 +10:00
# Setup toolchain for rosa builds, from gentoo
# https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/toolchain/BUILD.gn
Source5 : BUILD.gn
Source10 : %{name} .rpmlintrc
2015-06-22 21:51:15 +10:00
Source30 : master_preferences
Source31 : default_bookmarks.html
Source32 : chromium.default
Source100 : icons.tar.bz2
Source997 : depot_tools.tar.xz
Source999 : new-system-icons.tar.xz
2019-09-21 23:02:43 +03:00
%if %{with gost}
Source1100 : Makefile.gost
2019-10-31 23:21:09 +03:00
Source1101 : https://github.com/deemru/chromium-gost/archive/%{chromium_gost_commit} .tar.gz?/chromium-gost-%{chromium_gost_commit} .tar.gz
Source1102 : https://github.com/deemru/msspi/archive/%{msspi_commit} .tar.gz?/msspi-%{msspi_commit} .tar.gz
2019-09-21 23:02:43 +03:00
%endif
2018-11-11 01:39:53 +03:00
Patch4 : chromium-30.0.1599.66-master-prefs-path.patch
2019-04-13 22:52:15 +03:00
# (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
2016-12-06 19:54:52 +03:00
2016-11-17 23:12:20 +10:00
Patch22 : chromium-54-proprietary-codecs-assert.patch
2018-11-11 01:39:53 +03:00
%if 0%{jsoncpp}
# (cjw) add missing unbundle gn files (1)
Patch28 : chromium-53-gn-system-icu-jsoncpp.patch
%endif
# (cjw) build pdfium with system libtiff and libpng
# (cjw) fix webrtc build with system ffmpeg
Patch35 : chromium-50-system-ffmpeg-3.patch
2017-08-09 15:04:16 +03:00
# (cjw) fix build with current glib...
Patch36 : chromium-58-glib.patch
2018-11-11 01:39:53 +03:00
# clang builtin subtract functions, scoped enum
Patch47 : chromium-61-gcc5.patch
2019-02-21 00:25:57 +03:00
# (cjw) fix i586 build
Patch198 : chromium-72-i586.patch
2018-11-11 01:39:53 +03:00
# New from Debian
Patch500 : chromium-third-party-cookies-off-by-default.patch
Patch501 : chromium-ps-print.patch
2016-01-03 00:58:07 +03:00
# Google patched their bundled copy of icu 54 to include API functionality that wasn't added until 55.
2018-11-11 01:39:53 +03:00
# :P
2016-11-17 23:12:20 +10:00
Patch502 : chromium-45.0.2454.101-system-icu-54-does-not-have-detectHostTimeZone.patch
2018-11-11 01:39:53 +03:00
# Patch to fix build with use_system_libvpx
# Chromium bug #541273
2016-01-22 11:33:10 +03:00
# fix build with icu other than 54
2018-11-11 01:39:53 +03:00
Patch504 : chromium-system-icu-r0.patch
2018-01-23 08:13:40 +03:00
# https://aur.archlinux.org/packages/chromium-vaapi/
2019-04-13 22:52:15 +03:00
Patch508 : chromium-vaapi.patch
2019-02-21 00:25:57 +03:00
# ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-widevine-r4.patch
Patch509 : chromium-widevine-r4.patch
2018-11-11 01:39:53 +03:00
# ROSA Build
Patch600 : chromium-buildname-60.0.3112.90.patch
# Patch to fix build
2017-11-02 05:09:14 +03:00
Patch601 : chromium-62-include-cstdlib.patch
2018-11-11 01:39:53 +03:00
# https://github.com/RussianFedora/chromium/blob/fedora-stable/chromium-66.0.3359.81-system-clang.patch
Patch603 : chromium-66.0.3359.81-system-clang.patch
2019-09-13 00:11:53 +03:00
# https://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/
2018-11-11 01:39:53 +03:00
Patch604 : chromium-compiler-r4.patch
# https://chromium.googlesource.com/chromium/src/+/40a8d84a54ac47d3299194c5377aebd71714f1f0%5E%21/
Patch607 : chromium-67.0.3396.87-fix-build-llvm-ar.patch
2019-10-04 11:30:14 +03:00
# From Chromium 79 (https://github.com/chromium/chromium/commit/b7091c42eb46871d9d7065de38de59a95f27b6f5)
Patch608 : chromium-77-pulseaudio-13.patch
2018-11-11 01:39:53 +03:00
2018-09-22 00:11:52 +03:00
# Add "ROSA" to the user agent string
2018-11-11 01:39:53 +03:00
Patch627 : chromium-68.0.3440.106-rosa-user-agent.patch
# Do not prefix libpng functions
Patch629 : chromium-60.0.3112.78-no-libpng-prefix.patch
# Fix errors build in 69
Patch631 : chromium-69.0.3497.100-build-error-in-clang6.patch
# Disable fontconfig cache magic that breaks remoting
Patch717 : chromium-70.0.3538.67-disable-fontconfig-cache-magic.patch
2018-10-31 06:06:49 +03:00
2015-06-22 21:51:15 +10:00
BuildRequires : bison
2018-04-24 14:28:44 +03:00
%if 0%{?clang}
BuildRequires : clang
BuildRequires : lld
BuildRequires : libcxx-devel
BuildRequires : libcxxabi-devel
%endif
2018-09-22 00:11:52 +03:00
# gn needs these
BuildRequires : libstdc++-static-devel
2016-11-17 23:12:20 +10:00
BuildRequires : flex
BuildRequires : git
BuildRequires : gperf
BuildRequires : gyp
BuildRequires : ninja
2018-11-11 01:39:53 +03:00
BuildRequires : nodejs
2016-11-17 23:12:20 +10:00
BuildRequires : util-linux
BuildRequires : yasm
BuildRequires : atomic-devel
2015-06-22 21:51:15 +10:00
BuildRequires : bzip2-devel
BuildRequires : cap-devel
2019-02-21 00:25:57 +03:00
#BuildRequires: closure-compiler
2015-06-22 21:51:15 +10:00
BuildRequires : cups-devel
BuildRequires : elfutils-devel
2018-08-13 15:03:08 +03:00
BuildRequires : jpeg-devel
2018-05-28 14:04:45 +03:00
%if 0%{jsoncpp}
2016-11-17 23:12:20 +10:00
BuildRequires : jsoncpp-devel
2018-05-28 14:04:45 +03:00
%endif
2015-06-22 21:51:15 +10:00
BuildRequires : pam-devel
2018-11-11 01:39:53 +03:00
BuildRequires : snappy-devel
2016-11-17 23:12:20 +10:00
BuildRequires : speech-dispatcher-devel
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(alsa)
BuildRequires : pkgconfig(atk)
BuildRequires : pkgconfig(dbus-glib-1)
BuildRequires : pkgconfig(expat)
2018-11-11 01:39:53 +03:00
%if 0%{?ffmpeg}
BuildRequires : pkgconfig(libavcodec) >= 4.0.2
%endif
BuildRequires : pkgconfig(flac)
2016-01-02 20:32:51 +03:00
BuildRequires : pkgconfig(fontconfig)
2017-08-09 15:04:16 +03:00
BuildRequires : pkgconfig(freetype2)
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(gconf-2.0)
BuildRequires : pkgconfig(gl)
BuildRequires : pkgconfig(glib-2.0)
BuildRequires : pkgconfig(glu)
BuildRequires : pkgconfig(gnome-keyring-1)
BuildRequires : pkgconfig(gstreamer-plugins-base-1.0)
2019-02-21 00:25:57 +03:00
#BuildRequires: pkgconfig(gtk+-2.0)
2016-03-08 19:51:23 +03:00
BuildRequires : pkgconfig(gtk+-3.0)
2018-11-11 01:39:53 +03:00
BuildRequires : pkgconfig(harfbuzz)
2016-03-08 19:43:38 +03:00
%if 0%{icu}
2016-01-02 20:32:51 +03:00
BuildRequires : pkgconfig(icu-i18n)
2016-03-08 19:43:38 +03:00
%endif
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(libexif)
BuildRequires : pkgconfig(libgcrypt)
BuildRequires : pkgconfig(libgpsd)
BuildRequires : pkgconfig(libmtp)
2016-11-17 23:12:20 +10:00
BuildRequires : pkgconfig(libopenjp2)
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(libpci)
2018-11-11 01:39:53 +03:00
BuildRequires : pkgconfig(libpng)
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(libpulse)
2018-11-11 01:39:53 +03:00
BuildRequires : pkgconfig(libtiff-4)
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(libusb-1.0)
2016-01-10 21:49:52 +03:00
BuildRequires : pkgconfig(libxml-2.0)
2018-11-11 01:39:53 +03:00
BuildRequires : pkgconfig(libxslt)
%if 0%{?libva}
2016-01-21 16:07:13 +03:00
BuildRequires : pkgconfig(libva)
2018-11-11 01:39:53 +03:00
%endif
2019-02-21 00:25:57 +03:00
BuildRequires : pkgconfig(glesv2)
2015-06-22 21:51:15 +10:00
BuildRequires : pkgconfig(minizip)
BuildRequires : pkgconfig(nspr)
BuildRequires : pkgconfig(nss)
BuildRequires : pkgconfig(opus)
BuildRequires : pkgconfig(speex)
BuildRequires : pkgconfig(udev)
BuildRequires : pkgconfig(xscrnsaver)
BuildRequires : pkgconfig(xt)
BuildRequires : pkgconfig(xtst)
2018-11-11 01:39:53 +03:00
BuildRequires : pkgconfig(zlib)
2018-09-22 00:11:52 +03:00
BuildRequires : pythonegg(beautifulsoup4)
BuildRequires : pythonegg(html5lib)
2019-09-21 23:02:43 +03:00
%if %{with gost}
BuildRequires : chrpath
%endif
2015-09-02 15:09:51 +03:00
2015-06-22 21:51:15 +10:00
Suggests : chromium-browser-pepper-flash
2016-11-19 02:30:47 +10:00
Conflicts : chromium-widevinecdm-plugin < 54
Obsoletes : chromium-widevinecdm-plugin < 54
2019-09-21 23:02:43 +03:00
Conflicts : %{crname} -beta
Conflicts : %{crname} -unstable
2019-10-04 12:16:33 +00:00
# There was a dummy empty package chromium-browser
# which depended from chromium-browser-stable and nothing more.
# We decided to remove that package.
# chromium-browser SUBpackage had Epoch=1
2019-10-09 14:16:06 +00:00
Obsoletes : %{crname} < 1:%{version} -%{release}
Provides : %{crname} = 1:%{version} -%{release}
2019-10-31 23:21:09 +03:00
Obsoletes : chromium-gost-lib < 78.0.3904.70
%if %{with gost}
Provides : chromium-gost-lib = %{EVRD}
%endif
2015-06-22 21:51:15 +10:00
2012-07-04 11:57:27 +04:00
%description
Chromium is a browser that combines a minimal design with sophisticated
technology to make the web faster, safer, and easier.
This is the stable channel Chromium browser. It offers a rock solid
browser which is updated with features and fixes once they have been
2018-04-24 14:28:44 +03:00
thoroughly tested.
2012-07-04 11:57:27 +04:00
Note: If you are reverting from unstable to stable or beta channel, you may
experience tab crashes on startup. This crash only affects tabs restored
during the first launch due to a change in how tab state is stored.
See http://bugs.chromium.org/34688. It's always a good idea to back up
your profile before changing channels.
2015-06-22 21:51:15 +10:00
%files
%config %{_sysconfdir} /%{crname}
%config %{_sysconfdir} /default/%{crname}
%{_bindir} /%{crname}
%{_crdir} /chromium-wrapper
%{_crdir} /chrome
%{_crdir} /chrome-sandbox
2016-03-08 19:43:38 +03:00
%{_crdir} /icudtl.dat
2015-06-22 21:51:15 +10:00
%{_crdir} /locales
2017-03-11 21:09:25 +03:00
%{_crdir} /*.pak
2015-06-22 21:51:15 +10:00
%{_crdir} /resources
%{_crdir} /themes
%{_crdir} /default_apps
2018-01-23 08:13:40 +03:00
%{_crdir} /swiftshader
2015-06-22 21:51:15 +10:00
%dir %{_crdir} /pepper
%{_datadir} /applications/*.desktop
%{_iconsdir} /hicolor/*/apps/chromium*
2017-07-29 03:30:57 +03:00
%post
2017-07-28 19:13:43 +03:00
# Remove chromium-browser-install package if we have it installed
2019-09-21 23:02:43 +03:00
if [ " $ ( r p m - q %{crname} - i n s t a l l | w c - w ) " = 1 ]
2017-07-28 19:13:43 +03:00
then
2019-09-21 23:02:43 +03:00
rpm -e %{crname} -install
2017-07-28 19:13:43 +03:00
fi
2015-06-22 21:51:15 +10:00
#----------------------------------------------------------------------------
2019-09-22 14:11:43 +03:00
%if %{with gost}
2019-10-31 23:21:09 +03:00
# %package -n chromium-gost-lib
# Summary: Library to enable GOST TLS in Chromium browser via CryptoPro
# Group: System/Libraries
# Requires: %{name} = %{EVRD}
#
# %description -n chromium-gost-lib
# If you need to make TLS work with GOST cryptography in Chromium browser,
# install this package and proprietary CryptoPro packages.
#
# Chromium looks for libgostssl.so from this package, if it finds it,
# then it dlopens it. CryptoPro's libcapi10.so and libcapi20.so are
# loaded by libgostssl.so. All this allows to use GOST TLS encryption
# via CryptoPro libraries which implement GOST TLS.
#
# %files -n chromium-gost-lib
# %{_crdir}/libgostssl.so
# %{_crdir}/gostssl.so
2019-09-22 14:11:43 +03:00
# Symlink to chromium-browser
# Disabled to prevent conflicts with chromium-gost RPMs
#%%{_bindir}/chromium-gost
2019-09-21 23:02:43 +03:00
%endif
2015-06-22 21:51:15 +10:00
#----------------------------------------------------------------------------
2019-09-22 14:11:43 +03:00
%package -n chromedriver
2015-06-22 21:51:15 +10:00
Summary : WebDriver for Google Chrome/Chromium
Group : Development/Other
2019-09-22 14:11:43 +03:00
Requires : %{name} = %{EVRD}
2013-01-25 15:10:50 +04:00
2019-09-22 14:11:43 +03:00
%description -n chromedriver
2013-01-25 15:10:50 +04:00
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.
2012-07-24 13:18:14 +04:00
2019-09-22 14:11:43 +03:00
%files -n chromedriver
2015-06-22 21:51:15 +10:00
%doc LICENSE AUTHORS
2019-09-22 14:11:43 +03:00
%{_bindir} /chromedriver
2015-06-22 21:51:15 +10:00
%{_crdir} /chromedriver
#----------------------------------------------------------------------------
2012-07-04 11:57:27 +04:00
%prep
2016-11-17 23:12:20 +10:00
%setup -qn chromium-%{version} -a 997 -a 999
2015-12-11 11:28:48 +03:00
2019-09-21 23:02:43 +03:00
%if %{with gost}
mkdir -p %{_gostsourcedir}
tar -C %{_gostsourcedir} --strip 1 -xf %{SOURCE1101}
sed -i \
-e " s , ^ # i n c l u d e < . . / s s l / i n t e r n a l . h > , # i n c l u d e \" $ { P W D } / t h i r d _ p a r t y / b o r i n g s s l / s r c / s s l / i n t e r n a l . h \" , g " \
%{_gostsourcedir} /src/gostssl.cpp
tar -C %{_gostsourcedir} /src/msspi --strip 1 -xf %{SOURCE1102}
2019-10-31 23:21:09 +03:00
sed -i 's/Chromium GOST/Chromium/g' %{_gostsourcedir} /patch/chromium.patch
2019-09-21 23:02:43 +03:00
patch -p1 < %{_gostsourcedir} /patch/chromium.patch
( cd ./third_party/boringssl/src
patch -p1 < %{_gostsourcedir} /patch/boringssl.patch )
2019-10-31 23:21:09 +03:00
#( cd %{_gostsourcedir}
2019-09-21 23:02:43 +03:00
# Canonical library naming requires to prefix their names with "lib"
# We make a symlink later
2019-10-31 23:21:09 +03:00
#grep -rIl gostssl.so . | xargs sed -i 's/gostssl.so/libgostssl.so/g' )
cp -f %{_gostsourcedir} /src/gostssl.cpp third_party/boringssl/gostssl.cpp
cp -f %{_gostsourcedir} /src/msspi/src/* third_party/boringssl
cp -f %{_gostsourcedir} /src/msspi/third_party/cprocsp/include/* third_party/boringssl/src/include
2019-09-21 23:02:43 +03:00
%endif
2012-07-24 16:01:58 +04:00
%patch4 -p1 -b .prefs
2019-04-13 22:52:15 +03:00
%patch6 -p1
%patch7 -p1
%patch8 -p1
2016-11-17 23:12:20 +10:00
%patch22 -p1
2018-11-11 01:39:53 +03:00
%if 0%{jsoncpp}
%patch28 -p1
%endif
%if 0%{?ffmpeg}
%patch35 -p1
2018-10-30 17:30:34 +03:00
%endif
2018-11-11 01:39:53 +03:00
%patch36 -p1
%patch47 -p1
2019-02-21 00:25:57 +03:00
%patch198 -p1
2018-11-11 01:39:53 +03:00
# new from debian
%patch500 -p1
%patch501 -p1
2015-09-07 09:49:47 +03:00
2016-03-08 19:43:38 +03:00
%if 0%{icu}
2016-01-29 18:38:34 +03:00
%patch502 -p1 -b .system-icu
%patch504 -p0 -b .icu-ver
2016-03-08 19:43:38 +03:00
%endif
2016-03-08 19:46:48 +03:00
%if 0%{?libva}
2018-11-11 01:39:53 +03:00
%patch508 -p1 -b .vaapi
2016-03-08 19:46:48 +03:00
%endif
2018-11-11 01:39:53 +03:00
%patch509 -p1
2016-03-08 19:46:48 +03:00
2018-11-11 01:39:53 +03:00
%patch600 -p1
2017-09-19 14:51:35 +03:00
%patch601 -p1
2018-11-11 01:39:53 +03:00
%patch603 -p1
%patch604 -p1
%patch607 -p1
2019-10-04 11:30:14 +03:00
patch -p1 < %{PATCH608}
2018-11-11 01:39:53 +03:00
2018-09-22 00:11:52 +03:00
%patch627 -p1
2018-11-11 01:39:53 +03:00
%patch629 -p1
%patch631 -p1 -b .clang6
%patch717 -p1
2018-10-14 01:55:18 +03:00
2018-04-24 14:28:44 +03:00
mkdir -p third_party/llvm-build/Release+Asserts/bin
pushd third_party/llvm-build/Release+Asserts/bin
2018-11-11 01:39:53 +03:00
ln -sf /usr/bin/clang clang
ln -sf /usr/bin/clang++ clang++
2018-04-24 14:28:44 +03:00
popd
2017-03-29 01:04:37 +03:00
2018-11-11 01:39:53 +03:00
# Remove most of the bundled libraries. Libraries specified below (taken from
# Gentoo's Chromium ebuild) are the libraries that needs to be preserved.
build/linux/unbundle/remove_bundled_libraries.py \
'buildtools/third_party/libc++' \
'buildtools/third_party/libc++abi' \
2019-08-07 17:33:12 +03:00
'base/third_party/cityhash' \
2019-10-31 23:21:09 +03:00
'base/third_party/double_conversion' \
2018-11-11 01:39:53 +03:00
'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' \
'chrome/third_party/mozilla_security_manager' \
'courgette/third_party' \
'net/third_party/mozilla_security_manager' \
'net/third_party/nss' \
'net/third_party/quic' \
'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' \
2019-02-21 00:25:57 +03:00
'third_party/angle/src/common/third_party/xxhash' \
2018-11-11 01:39:53 +03:00
'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/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' \
2019-08-07 02:45:29 +03:00
'third_party/axe-core' \
2018-11-11 01:39:53 +03:00
'third_party/blanketjs' \
'third_party/blink' \
'third_party/boringssl' \
'third_party/boringssl/src/third_party/fiat' \
2019-08-07 17:33:12 +03:00
'third_party/boringssl/src/third_party/sike' \
'third_party/boringssl/linux-aarch64/crypto/third_party/sike' \
'third_party/boringssl/linux-x86_64/crypto/third_party/sike' \
2018-11-11 01:39:53 +03:00
'third_party/breakpad' \
'third_party/breakpad/breakpad/src/third_party/curl' \
'third_party/brotli' \
'third_party/cacheinvalidation' \
'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/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' \
2019-10-31 23:21:09 +03:00
'third_party/catapult/tracing/third_party/jpeg-js' \
2018-11-11 01:39:53 +03:00
'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' \
2019-02-21 00:25:57 +03:00
'third_party/closure_compiler' \
2018-11-11 01:39:53 +03:00
'third_party/crashpad' \
2019-08-07 02:45:29 +03:00
'third_party/crashpad/crashpad/third_party/lss' \
'third_party/crashpad/crashpad/third_party/zlib' \
2018-11-11 01:39:53 +03:00
'third_party/crc32c' \
'third_party/cros_system_api' \
2019-08-07 02:45:29 +03:00
'third_party/dav1d' \
'third_party/dawn' \
2019-10-31 23:21:09 +03:00
'third_party/depot_tools' \
2018-11-11 01:39:53 +03:00
'third_party/devscripts' \
'third_party/dom_distiller_js' \
2019-08-07 02:45:29 +03:00
'third_party/emoji-segmenter' \
2018-11-11 01:39:53 +03:00
'third_party/expat' \
'third_party/ffmpeg' \
'third_party/flac' \
'third_party/flatbuffers' \
'third_party/flot' \
'third_party/fontconfig' \
'third_party/freetype' \
2019-02-21 00:25:57 +03:00
'third_party/glslang' \
2018-11-11 01:39:53 +03:00
'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/googletest' \
'third_party/harfbuzz-ng' \
'third_party/hunspell' \
'third_party/iccjpeg' \
'third_party/icu' \
'third_party/inspector_protocol' \
'third_party/jinja2' \
2018-12-16 01:01:23 +03:00
'third_party/jsoncpp' \
2018-11-11 01:39:53 +03:00
'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/libdrm' \
'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/libxml' \
'third_party/libxml/chromium' \
'third_party/libxslt' \
'third_party/libwebm' \
'third_party/libwebp' \
'third_party/libyuv' \
'third_party/llvm-build' \
'third_party/lss' \
'third_party/lzma_sdk' \
'third_party/markupsafe' \
'third_party/mesa' \
'third_party/metrics_proto' \
'third_party/modp_b64' \
2019-02-21 00:25:57 +03:00
'third_party/nasm' \
2018-11-11 01:39:53 +03:00
'third_party/node' \
'third_party/node/linux' \
'third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2' \
2019-09-13 00:11:53 +03:00
'third_party/one_euro_filter' \
2018-11-11 01:39:53 +03:00
'third_party/openh264' \
2019-08-07 17:33:12 +03:00
'third_party/openscreen' \
2019-09-13 00:11:53 +03:00
'third_party/openscreen/src/third_party/tinycbor/src/src' \
2018-11-11 01:39:53 +03:00
'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' \
2019-08-07 02:45:29 +03:00
'third_party/pffft' \
2018-11-11 01:39:53 +03:00
'third_party/ply' \
'third_party/polymer' \
2019-10-31 23:21:09 +03:00
'third_party/private-join-and-compute' \
2018-11-11 01:39:53 +03:00
'third_party/protobuf' \
'third_party/protobuf/third_party/six' \
'third_party/pyjson5' \
'third_party/qcms' \
'third_party/qunit' \
'third_party/re2' \
'third_party/rnnoise' \
'third_party/s2cellid' \
'third_party/sfntly' \
'third_party/simplejson' \
'third_party/sinonjs' \
'third_party/skia' \
2019-08-07 17:33:12 +03:00
'third_party/skia/include/third_party/skcms' \
2019-04-13 22:52:15 +03:00
'third_party/skia/include/third_party/vulkan' \
2018-11-11 01:39:53 +03:00
'third_party/skia/third_party/gif' \
'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' \
2018-12-16 01:01:23 +03:00
'third_party/SPIRV-Tools' \
2018-11-11 01:39:53 +03:00
'third_party/sqlite' \
'third_party/swiftshader' \
2019-08-07 17:33:12 +03:00
'third_party/swiftshader/third_party/llvm-7.0' \
2018-11-11 01:39:53 +03:00
'third_party/swiftshader/third_party/llvm-subzero' \
2019-08-07 17:33:12 +03:00
'third_party/swiftshader/third_party/subzero' \
2019-09-13 00:11:53 +03:00
'third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1' \
2018-11-11 01:39:53 +03:00
'third_party/tcmalloc' \
'third_party/test_fonts' \
'third_party/unrar' \
'third_party/usb_ids' \
'third_party/usrsctp' \
'third_party/vulkan' \
'third_party/web-animations-js' \
'third_party/webdriver' \
'third_party/webrtc' \
'third_party/webrtc/common_audio/third_party/fft4g' \
'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/xdg-utils' \
'third_party/yasm' \
'third_party/zlib' \
'third_party/zlib/google' \
'tools/gn/base/third_party/icu' \
'url/third_party/mozilla' \
2019-04-13 22:52:15 +03:00
'v8/src/third_party/siphash' \
2018-11-11 01:39:53 +03:00
'v8/src/third_party/utf8-decoder' \
'v8/src/third_party/valgrind' \
'v8/third_party/inspector_protocol' \
'v8/third_party/v8' \
--do-remove
2018-11-26 14:11:37 +03:00
2016-11-17 23:12:20 +10:00
# 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
2016-01-02 20:32:51 +03:00
2012-07-04 11:57:27 +04:00
# Hard code extra version
2015-10-22 13:02:58 +03:00
FILE=chrome/common/channel_info_posix.cc
2012-07-04 11:57:27 +04:00
sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"%{product_vendor} %{product_version}"/' $FILE
cmp $FILE $FILE.orig && exit 1
2018-12-16 01:01:23 +03:00
# Remove compiler flags not supported by our system clang
sed -i \
-e '/"-Wno-defaulted-function-deleted"/d' \
build/config/compiler/BUILD.gn
2017-04-22 13:40:30 +03:00
# setup node
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
2018-10-31 10:02:21 +03:00
2018-10-17 16:13:17 +03:00
%build
2019-09-21 23:02:43 +03:00
2019-10-31 23:21:09 +03:00
# %if %{with gost}
# make --file %{SOURCE1100} \
# SDIR="%{_gostsourcedir}" \
# OUTDIR="%{_gostsourcedir}" \
# CC="%{__cc}" \
# CXX="%{__cxx}" \
# CFLAGS="%{optflags} -Wno-error=attributes"
# %endif
2019-09-21 23:02:43 +03:00
2018-11-11 01:39:53 +03:00
%define system_gn_list ffmpeg
# flac libxslt snappy yasm libpng zlib
# opus
# icu
# libevent
# libvpx
# libwebp
# System libxml must be built with icu support to be used in Chromium
# libxml
# handled by upstream regular build scripts? : freetype harfbuzz-ng
# jsoncpp
%if 0%{clang}
%define is_clang true
%else
%define is_clang false
%endif
2018-04-24 14:28:44 +03:00
2018-08-13 15:03:08 +03:00
# widevinecdmadapter
2018-09-26 00:21:20 +03:00
# Build error with widevinecdmadapter in 67.0.3396.62 (fixed)
2018-08-13 15:03:08 +03:00
%define widevine 1
2018-09-22 16:40:06 +03:00
%if 0%{widevine}
2018-08-13 15:03:08 +03:00
%define is_widevine true
%else
%define is_widevine false
%endif
2019-02-21 00:32:14 +03:00
%define lld 1
2018-11-11 01:39:53 +03:00
%if 0%{lld}
%define is_lld true
%define use_gold false
%else
%define is_lld false
%define use_gold true
%endif
2019-03-09 17:14:11 +00:00
# jumbo https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md
# (Alzim) 1 - localhost, 0 - ABF build
%define localhost 0
%if 0%{localhost}
%define is_limit 100
%else
2019-04-13 22:52:15 +03:00
%define is_limit 50
2019-03-09 17:14:11 +00:00
%endif
2018-09-26 00:21:20 +03:00
%if 0%{?libva}
%define is_vaapi true
%else
%define is_vaapi false
2018-09-22 16:40:06 +03:00
%endif
2016-11-17 23:12:20 +10:00
# v NO TABS IN HERE!
2018-05-28 14:04:45 +03:00
%define gn_config use_sysroot=false \
2016-11-17 23:12:20 +10:00
system_libdir=" % { _ l i b } " \
icu_use_data_file=true \
2018-11-11 01:39:53 +03:00
enable_nacl=false \
is_nacl_glibc=false \
2016-11-17 23:12:20 +10:00
binutils_path=" %{_bindir} " \
linux_use_bundled_binutils=false \
2018-11-11 01:39:53 +03:00
use_gold=%{use_gold} \
2016-11-17 23:12:20 +10:00
custom_toolchain=" %{_sourcedir} : d e f a u l t " \
2018-11-11 01:39:53 +03:00
ffmpeg_branding=" C h r o m i u m " \
2016-11-17 23:12:20 +10:00
proprietary_codecs=true \
enable_ac3_eac3_audio_demuxing=true \
enable_mse_mpeg2ts_stream_parser=true \
enable_hevc_demuxing=true \
2018-11-11 01:39:53 +03:00
use_system_libjpeg=true \
use_libjpeg_turbo=false \
2018-08-13 15:03:08 +03:00
enable_widevine=%{is_widevine} \
2016-11-17 23:12:20 +10:00
pdf_enable_xfa=true \
use_pulseaudio=true \
use_allocator=" n o n e " \
treat_warnings_as_errors=false \
2018-11-11 01:39:53 +03:00
fatal_linker_warnings=false \
2016-11-19 02:16:30 +10:00
use_aura=true \
2018-11-11 01:39:53 +03:00
use_libpci = true \
2016-11-17 23:12:20 +10:00
is_debug=false \
2019-02-21 00:25:57 +03:00
gtk_version=3 \
closure_compile=false \
2018-04-24 14:28:44 +03:00
is_clang=%{is_clang} \
clang_use_chrome_plugins=false \
2018-10-14 22:19:18 +03:00
clang_base_path=" %{_prefix} " \
2018-11-11 01:39:53 +03:00
use_jumbo_build = true \
2019-03-09 17:14:11 +00:00
jumbo_file_merge_limit = %{is_limit} \
2018-11-11 01:39:53 +03:00
use_lld=%{is_lld} \
2018-01-06 00:13:37 +03:00
use_system_freetype=true \
2018-11-11 01:39:53 +03:00
use_system_harfbuzz=false \
use_system_libpng=true \
2018-09-26 00:21:20 +03:00
use_vaapi=%{is_vaapi} \
2018-05-28 14:04:45 +03:00
v8_use_external_startup_data=false \
2016-11-17 23:12:20 +10:00
google_api_key=" %{google_api_key} " \
google_default_client_id=" %{google_default_client_id} " \
2018-11-11 01:39:53 +03:00
google_default_client_secret=" %{google_default_client_secret} "
2016-11-17 23:12:20 +10:00
build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list}
third_party/libaddressinput/chromium/tools/update-strings.py
2018-11-11 01:39:53 +03:00
%if 0%{?clang}
export CC=clang
export CXX=clang++
export AR=ar
export NM=nm
# flags to fix i586 builds
2019-02-22 15:19:21 +03:00
export LDFLAGS=" $ L D F L A G S - W l , - z , n o t e x t - p t h r e a d "
2018-11-11 01:39:53 +03:00
%else
%setup _compile_flags
CC=%{__cc} ; export CC
CXX=%{__cxx} ; export CXX
AR=%{__ar} ; export AR
NM=%{__nm} ; export NM
LD=%{__cxx} ; export LD
# filter out some flags to fix i586 builds
CFLAGS=$(echo " $ C F L A G S " |sed -e 's/-gdwarf-4//' -e 's/-fvar-tracking-assignments//' -e 's/-frecord-gcc-switches//' )
CXXFLAGS=$(echo " $ C X X F L A G S " |sed -e 's/-gdwarf-4//' -e 's/-fvar-tracking-assignments//' -e 's/-frecord-gcc-switches//' )
CFLAGS=" $ C F L A G S - W n o - e r r o r = p o i n t e r - t o - i n t - c a s t - W n o - e r r o r = i n t - t o - p o i n t e r - c a s t "
CXXFLAGS=" $ C X X F L A G S - W n o - e r r o r = a t t r i b u t e s - W n o - e r r o r = c o m m e n t - W n o - e r r o r = u n u s e d - v a r i a b l e - W n o - e r r o r = s t r i c t - o v e r f l o w - W n o - e r r o r = d e p r e c a t e d - d e c l a r a t i o n s "
%endif
2016-11-17 23:12:20 +10:00
python tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
out/Release/gn gen --args='%{gn_config}' out/Release
2018-11-11 01:39:53 +03:00
pushd out/Release
# widevinecdmadapter
# Build error with widevinecdmadapter in 67.0.3396.62
ninja %{_smp_mflags} chrome chrome_sandbox chromedriver
popd
2012-07-04 11:57:27 +04:00
%install
mkdir -p %{buildroot} %{_bindir}
mkdir -p %{buildroot} %{_crdir} /locales
mkdir -p %{buildroot} %{_crdir} /themes
mkdir -p %{buildroot} %{_crdir} /default_apps
2016-12-06 19:54:52 +03:00
install -m 755 %{SOURCE1} %{buildroot} %{_crdir} /chromium-wrapper
2012-07-04 11:57:27 +04:00
install -m 755 out/Release/chrome %{buildroot} %{_crdir} /
install -m 4755 out/Release/chrome_sandbox %{buildroot} %{_crdir} /chrome-sandbox
2013-01-25 15:10:50 +04:00
cp -a out/Release/chromedriver %{buildroot} %{_crdir} /chromedriver
2014-04-10 12:38:43 +04:00
install -m 644 out/Release/*.pak %{buildroot} %{_crdir} /
2016-03-08 19:43:38 +03:00
install -m 644 out/Release/icudtl.dat %{buildroot} %{_crdir} /
2015-02-09 22:50:26 +03:00
2012-07-04 11:57:27 +04:00
install -m 644 out/Release/locales/*.pak %{buildroot} %{_crdir} /locales/
install -m 644 out/Release/resources.pak %{buildroot} %{_crdir} /
install -m 644 chrome/browser/resources/default_apps/* %{buildroot} %{_crdir} /default_apps/
ln -s %{_crdir} /chromium-wrapper %{buildroot} %{_bindir} /%{crname}
2014-05-14 17:35:50 +04:00
sed -i " s ! @ L I B D I R @ ! %{_libdir} ! g " %{buildroot} %{_crdir} /chromium-wrapper
2013-01-25 15:10:50 +04:00
ln -s %{_crdir} /chromedriver %{buildroot} %{_bindir} /chromedriver
2012-07-04 11:57:27 +04:00
2018-01-23 08:13:40 +03:00
cp -r out/Release/swiftshader %{buildroot} %{_crdir}
2014-05-14 17:35:50 +04:00
# create global config file
mkdir -p %{buildroot} %{_sysconfdir} /default
install -m644 %{SOURCE32} %{buildroot} %{_sysconfdir} /default/%{crname}
# create pepper dir. talkplugin works fine only if sylinks in pepper
mkdir -p %{buildroot} %{_crdir} /pepper
2012-07-04 11:57:27 +04:00
find out/Release/resources/ -name " * . d " -exec rm {} \;
cp -r out/Release/resources %{buildroot} %{_crdir}
# desktop file
mkdir -p %{buildroot} %{_datadir} /applications
2017-01-16 16:04:48 +03:00
install -m 644 %{SOURCE2} %{buildroot} %{_datadir} /applications/
2012-07-04 11:57:27 +04:00
# icon
2014-05-29 12:59:28 +04:00
mkdir -p %{buildroot} %{_iconsdir} /hicolor/
tar xjf %{SOURCE100} -C %{buildroot} %{_iconsdir} /hicolor/
2012-07-04 11:57:27 +04:00
2012-07-24 16:01:58 +04:00
mkdir -p %{buildroot} %{_sysconfdir} /%{crname}
install -m 0644 %{SOURCE30} %{buildroot} %{_sysconfdir} /%{crname} /
install -m 0644 %{SOURCE31} %{buildroot} %{_sysconfdir} /%{crname} /
2019-10-31 23:21:09 +03:00
#%if %{with gost}
#install -m0644 %{_gostsourcedir}/libgostssl.so %{buildroot}%{_crdir}/libgostssl.so
2019-09-21 23:02:43 +03:00
# Compatibility symlink: it is named gostssl.so in other builds of Chromium-GOST
# but it is common to prefix libraries with "lib"
2019-10-31 23:21:09 +03:00
#( cd %{buildroot}%{_crdir}/ && ln -s libgostssl.so gostssl.so )
2019-09-22 14:11:43 +03:00
# Disabled to prevent conflicts with chromium-gost RPMs
#( cd %{buildroot}%{_bindir}/ && ln -s %{crname} chromium-gost )
2019-09-21 23:02:43 +03:00
2019-09-22 14:11:43 +03:00
# Find all files and process them (idea from ALT)
2019-10-31 23:21:09 +03:00
#find %{buildroot}%{_crdir} -type f |
#while read f; do
2019-09-21 23:02:43 +03:00
# resolve symlinks
2019-10-31 23:21:09 +03:00
#t="$(readlink -ev "$f")"
#file "$t" | fgrep -qs ELF || continue
2019-09-21 23:02:43 +03:00
# Add real RPATH. We need RPATH in GOST builds because 'dlopen(libgostssl.so)'
# is performed, but libgostssl.so will not be found without RPATH.
# Here we could change chromium.path from chromium-gost so that it has
# an absolute path to "gostssl.so" instead of a relative one
# but it is strange to hardcode absolute paths to libraries and will
# break running our Chromium somewhere outside of standard locations.
2019-10-31 23:21:09 +03:00
#chrpath -r '%{_crdir}' "$t" ||:
#done
#%endif
2019-09-21 23:02:43 +03:00
2012-10-23 15:04:10 +04:00
find %{buildroot} -name " * . n e x e " -exec strip {} \;