2011-09-20 16:10:49 +00:00
#
# spec file for package chromium
#
2016-01-14 15:42:08 +00:00
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
2011-09-20 16:10:49 +00:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-07-25 14:53:12 +00:00
2011-09-20 16:10:49 +00:00
Name : chromium
2016-09-30 08:09:37 +00:00
Version : 53.0.2785.143
2011-12-10 18:59:34 +00:00
Release : 0
2011-09-20 16:10:49 +00:00
Summary : Google's opens source browser project
2011-12-10 18:59:34 +00:00
License : BSD-3-Clause and LGPL-2.1+
2011-09-20 16:10:49 +00:00
Group : Productivity/Networking/Web/Browsers
Url : http://code.google.com/p/chromium/
2016-02-06 09:14:09 +00:00
Source0 : http://commondatastorage.googleapis.com/chromium-browser-official/%{name} -%{version} .tar.xz
2014-09-07 08:26:40 +00:00
Source2 : %{name} -rpmlintrc
2011-09-20 16:10:49 +00:00
Source30 : master_preferences
Source31 : default_bookmarks.html
Source99 : chrome-wrapper
Source100 : chromium-browser.sh
Source101 : chromium-browser.desktop
Source102 : chromium-browser.xml
2012-11-25 12:55:50 +00:00
Source103 : chromium.default
2011-09-20 16:10:49 +00:00
Source104 : chromium-icons.tar.bz2
## Start Patches
2013-08-27 08:00:10 +00:00
# PATCH-FIX-OPENSUSE Make the 1-click-install ymp file always download [bnc#836059]
2014-08-28 11:37:18 +00:00
Patch1 : exclude_ymp.diff
2011-09-22 09:54:33 +00:00
# PATCH-FIX-OPENSUSE enables reading of the master preference
2016-08-22 10:45:36 +00:00
Patch2 : chromium-master-prefs-path.patch
2011-12-01 12:23:55 +00:00
# PATCH-FIX-UPSTREAM Add more charset aliases
2016-08-22 10:45:36 +00:00
Patch3 : chromium-more-codec-aliases.patch
2012-01-26 08:17:54 +00:00
# PATCH-FIX-OPENSUSE Compile the sandbox with -fPIE settings
2016-08-22 10:45:36 +00:00
Patch4 : chromium-sandbox-pie.patch
2015-11-04 14:35:23 +00:00
# PATCH-FIX-OPENSUSE chromium-46.0.2490.71-fix-missing-i18n_process_css_test.patch - file was removed
2016-08-27 18:49:35 +00:00
Patch5 : chromium-46.0.2490.71-fix-missing-i18n_process_css_test.patch
2015-12-05 10:45:51 +00:00
# PATCH-FIX-OPENSUSE fix_building_widevinecdm_with_chromium.patch - Enable WideVine plugin
2016-08-27 18:49:35 +00:00
Patch6 : fix_building_widevinecdm_with_chromium.patch
2015-12-29 20:42:58 +00:00
# PATCH-FIX-OPENSUSE fix_network_api_crash.patch - Fix crash in network API, e.g. when using chromecast extension
2016-08-27 18:49:35 +00:00
Patch7 : fix_network_api_crash.patch
2016-06-23 08:11:56 +00:00
# PATCH-FIX-OPENSUSE gcc60-fixes.diff - Fix crashes due to the GCC6 optimizations
2016-08-27 18:49:35 +00:00
Patch8 : gcc60-fixes.diff
2016-09-17 11:42:07 +00:00
# PATCH-FIX-UPSTREAM: sanbox crashers avoidance
Patch9 : chromium-sandbox.patch
2014-09-01 07:27:07 +00:00
# archlinux arm enhancement patches
Patch100 : arm-webrtc-fix.patch
2016-08-27 19:45:06 +00:00
Patch101 : arm_use_right_compiler.patch
2016-08-22 10:45:36 +00:00
# GN buildsystem related patches
Patch200 : chromium-last-commit-position-r0.patch
2011-09-20 16:10:49 +00:00
BuildRequires : alsa-devel
2016-08-27 18:49:35 +00:00
BuildRequires : binutils-gold
2011-09-20 16:10:49 +00:00
BuildRequires : bison
BuildRequires : cups-devel
2016-08-27 18:49:35 +00:00
BuildRequires : dbus-1-devel
2011-09-20 16:10:49 +00:00
BuildRequires : desktop-file-utils
BuildRequires : fdupes
2013-01-27 09:26:35 +00:00
BuildRequires : flac-devel
2011-09-20 16:10:49 +00:00
BuildRequires : flex
BuildRequires : freetype2-devel
2013-06-05 21:12:40 +00:00
BuildRequires : gcc
2011-09-20 16:10:49 +00:00
BuildRequires : gcc-c++
BuildRequires : gperf
2016-08-27 18:49:35 +00:00
BuildRequires : harfbuzz-devel
2013-03-27 21:38:42 +00:00
BuildRequires : hicolor-icon-theme
2011-09-20 16:10:49 +00:00
BuildRequires : hunspell-devel
2013-12-10 23:03:50 +00:00
BuildRequires : krb5-devel
2012-10-16 13:15:09 +00:00
BuildRequires : libbz2-devel
2012-03-06 09:34:34 +00:00
BuildRequires : libelf-devel
2016-08-27 18:49:35 +00:00
BuildRequires : libevent-devel
2012-08-23 09:49:46 +00:00
BuildRequires : libexpat-devel
2016-08-22 10:45:36 +00:00
BuildRequires : libpulse-devel
2016-08-27 18:49:35 +00:00
BuildRequires : libwebp-devel
2016-08-22 10:45:36 +00:00
BuildRequires : python-xml
2016-08-27 18:49:35 +00:00
BuildRequires : snappy-devel
BuildRequires : update-desktop-files
BuildRequires : zlib-devel
BuildRequires : pkgconfig(libffi)
2016-08-22 10:45:36 +00:00
Requires(pre) : permissions
2016-08-27 18:49:35 +00:00
BuildRequires : SDL-devel
BuildRequires : dirac-devel >= 1.0.0
BuildRequires : libcap-devel
BuildRequires : libdc1394
BuildRequires : libdc1394-devel
BuildRequires : libdrm-devel
2012-08-23 09:19:32 +00:00
BuildRequires : libgcrypt-devel
2012-03-06 09:34:34 +00:00
BuildRequires : libgnome-keyring-devel
2016-08-27 18:49:35 +00:00
BuildRequires : libgsm
BuildRequires : libgsm-devel
BuildRequires : libjack-devel
BuildRequires : libogg-devel
BuildRequires : liboil-devel >= 0.3.15
BuildRequires : libopenssl-devel
BuildRequires : libtheora-devel >= 1.1
BuildRequires : libvdpau-devel
BuildRequires : libvorbis-devel
BuildRequires : libvpx-devel
BuildRequires : ncurses-devel
2016-03-08 09:21:20 +00:00
BuildRequires : ninja
2013-03-27 21:38:42 +00:00
BuildRequires : pam-devel
2012-11-09 15:42:28 +00:00
BuildRequires : pciutils-devel
2013-03-27 21:38:42 +00:00
BuildRequires : pkg-config
2011-09-20 16:10:49 +00:00
BuildRequires : python
2012-03-06 09:34:34 +00:00
BuildRequires : python-devel
2016-08-27 18:49:35 +00:00
BuildRequires : schroedinger-devel
BuildRequires : slang-devel
BuildRequires : texinfo
2013-04-10 20:44:14 +00:00
BuildRequires : util-linux
2013-09-21 18:25:01 +00:00
BuildRequires : valgrind-devel
2011-09-20 16:10:49 +00:00
BuildRequires : wdiff
2012-03-06 09:34:34 +00:00
BuildRequires : pkgconfig(cairo) >= 1.6
BuildRequires : pkgconfig(dbus-1)
BuildRequires : pkgconfig(gconf-2.0)
BuildRequires : pkgconfig(glib-2.0)
BuildRequires : pkgconfig(gtk+-2.0)
2016-08-22 10:45:36 +00:00
BuildRequires : pkgconfig(gtk+-3.0)
2016-08-27 18:49:35 +00:00
BuildRequires : pkgconfig(libcrypto)
BuildRequires : pkgconfig(libexif)
2013-03-27 21:38:42 +00:00
BuildRequires : pkgconfig(libudev)
2013-01-27 09:26:35 +00:00
BuildRequires : pkgconfig(libxslt)
2013-09-02 13:54:22 +00:00
BuildRequires : pkgconfig(nspr) >= 4.9.5
BuildRequires : pkgconfig(nss) >= 3.14
2016-08-27 18:49:35 +00:00
BuildRequires : pkgconfig(sqlite3)
2012-03-06 09:34:34 +00:00
BuildRequires : pkgconfig(x11)
BuildRequires : pkgconfig(xcomposite)
2012-04-08 12:17:20 +00:00
BuildRequires : pkgconfig(xcursor)
2013-03-27 21:38:42 +00:00
BuildRequires : pkgconfig(xdamage)
2012-03-06 09:34:34 +00:00
BuildRequires : pkgconfig(xext)
BuildRequires : pkgconfig(xfixes)
BuildRequires : pkgconfig(xi)
2012-08-21 09:40:51 +00:00
BuildRequires : pkgconfig(xrandr)
2012-03-06 09:34:34 +00:00
BuildRequires : pkgconfig(xrender)
BuildRequires : pkgconfig(xscrnsaver)
BuildRequires : pkgconfig(xt)
2013-03-09 19:11:01 +00:00
BuildRequires : pkgconfig(xtst)
2016-01-31 12:23:18 +00:00
Requires : alsa
Requires : ffmpegsumo
Requires : hicolor-icon-theme
Requires : update-alternatives
Requires : xdg-utils
Requires(pre) : permissions
# Recommends the chromium-ffmpeg library (available from packman)
2016-08-27 18:58:01 +00:00
Recommends: %{name} -ffmpeg
2016-01-31 12:23:18 +00:00
Conflicts : otherproviders(chromium-browser)
Provides : chromium-based-browser = %{version}
Provides : chromium-browser = %{version}
Provides : browser(npapi)
Obsoletes : %{name} -suid-helper < %{version}
Obsoletes : chromium-browser < %{version}
Provides : %{name} -suid-helper = %{version}
2016-08-28 12:37:47 +00:00
ExclusiveArch : %{ix86} x86_64 %arm
2015-11-14 16:17:44 +00:00
#Requirements to build a fully functional ffmpeg
# This can only be done on packman OBS
%if 0%{?packman_bs}
BuildRequires : libfaac-devel >= 1.28
BuildRequires : libmp3lame-devel
BuildRequires : libopencore-amr-devel
2016-01-31 12:23:18 +00:00
BuildRequires : libx264-devel
BuildRequires : libxvidcore-devel
2013-09-21 17:27:21 +00:00
%endif
2011-09-20 16:10:49 +00:00
2016-08-27 18:49:35 +00:00
#Define the maximum number of build processes to prevent running out of memory
%ifarch %arm
%define ninjaproc 2
%else
%define ninjaproc 4
%endif
2011-09-20 16:10:49 +00:00
%description
Chromium is the open-source project behind Google Chrome. We invite you to join us in our effort to help build a safer, faster, and more stable way for all Internet users to experience the web, and to create a powerful platform for developing a new generation of web applications.
2012-11-20 14:12:54 +00:00
%package ffmpegsumo
2015-07-29 09:14:11 +00:00
Summary : Library to provide partial ffmpeg support to Chromium
2012-11-20 14:12:54 +00:00
License : BSD-3-Clause and LGPL-2.1+
Group : Productivity/Networking/Web/Browsers
2013-09-22 16:11:49 +00:00
Requires : %{name}
2016-01-31 12:23:18 +00:00
Conflicts : otherproviders(ffmpegsumo)
2016-08-27 19:00:07 +00:00
Conflicts : %{name} -ffmpeg
2016-01-31 12:23:18 +00:00
Provides : ffmpegsumo = %{version}
2012-11-20 14:12:54 +00:00
%description ffmpegsumo
The is the multimedia codec library for Chromium. It is based on the internal ffmpeg source code and contains only the open source codecs from ffmpeg. Proprietary codecs (e.g. H.264) are not part of this library, but are provided in an external package
2011-09-20 16:10:49 +00:00
%package desktop-kde
Summary : Update to chromium to use KDE's kwallet to store passwords
2012-04-19 09:15:10 +00:00
License : BSD-3-Clause and LGPL-2.1+
2011-12-28 12:13:39 +00:00
Group : Productivity/Networking/Web/Browsers
2016-01-31 12:23:18 +00:00
Requires(post) : chromium = %{version}
Conflicts : otherproviders(chromium-password)
Provides : chromium-password = %{version}
2016-01-29 07:55:04 +00:00
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 && 0%{?is_opensuse}
Supplements: packageand(chromium:plasma5-session)
%else
2011-09-20 16:10:49 +00:00
Supplements: packageand(chromium:kdebase4-session)
2016-01-29 07:55:04 +00:00
%endif
2011-09-20 16:10:49 +00:00
%description desktop-kde
2016-07-13 00:33:24 +00:00
By using the openSUSE update-alternatives the password store for Chromium is changed to utilize KDE's kwallet. If access to passwords stored via Chromium (3-dot menu > Settings > Show advanced settings > Passwords and forms > Manage passwords) or using KDE' s KWallet presents a problem, see <https://bugs.chromium.org/p/chromium/issues/detail?id=620360#c3>.
2011-09-20 16:10:49 +00:00
%package desktop-gnome
Summary : Update to chromium to use Gnome keyring to store passwords
2012-04-19 09:15:10 +00:00
License : BSD-3-Clause and LGPL-2.1+
2011-12-28 12:13:39 +00:00
Group : Productivity/Networking/Web/Browsers
2016-01-31 12:23:18 +00:00
Requires : libgnome
Requires(post) : chromium = %{version}
2011-09-20 16:10:49 +00:00
Supplements: packageand(chromium:gnome-session)
2014-02-21 15:23:13 +00:00
Conflicts : otherproviders(chromium-password)
Provides : chromium-password = %{version}
2011-09-20 16:10:49 +00:00
%description desktop-gnome
2016-07-13 00:33:24 +00:00
By using the openSUSE update-alternatives the password store for Chromium is changed to utilize Gnome's Keyring. If access to passwords stored via Chromium (3-dot menu > Settings > Show advanced settings > Passwords and forms > Manage passwords) or using Gnome' s Keyring presents a problem, see <https://bugs.chromium.org/p/chromium/issues/detail?id=620360#c3>.
2011-09-20 16:10:49 +00:00
2012-04-18 14:02:36 +00:00
%package -n chromedriver
2012-04-19 09:15:10 +00:00
Summary : WebDriver for Google Chrome/Chromium
License : BSD-3-Clause
Group : Development/Tools/Other
Url : http://code.google.com/p/chromedriver/
2012-04-18 14:02:36 +00:00
%description -n chromedriver
2012-04-19 09:15:10 +00: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.
2013-10-01 19:26:07 +00:00
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
%package ffmpeg
2015-07-29 09:14:11 +00:00
Summary : The ffmpeg library for Google's opens source browser Chromium
2013-09-22 16:11:49 +00:00
License : BSD-3-Clause and LGPL-2.1+
Group : Productivity/Networking/Web/Browsers
2016-08-27 19:13:04 +00:00
Requires : %{name}
2016-01-31 12:23:18 +00:00
Conflicts : otherproviders(ffmpegsumo)
Provides : ffmpegsumo = %{version}
2013-09-22 16:11:49 +00:00
%description ffmpeg
FFMPEG library built from the chromium sources.
%endif
2011-09-20 16:10:49 +00:00
%prep
2016-08-22 10:45:36 +00:00
%setup -q
#GN Buildsystem fixes
%patch200 -p1
2016-01-31 12:23:18 +00:00
2016-08-22 10:45:36 +00:00
#Standard patches
2016-01-31 12:23:18 +00:00
%patch1
2016-08-22 10:45:36 +00:00
%patch2
%patch3
2016-01-31 12:23:18 +00:00
%patch4
2016-08-22 10:45:36 +00:00
%patch5 -p1
%patch6 -p1
2016-01-31 12:23:18 +00:00
%patch7
2016-06-23 08:41:04 +00:00
%if 0%{?suse_version} > 1320
2016-08-22 10:45:36 +00:00
%patch8
2016-06-23 08:41:04 +00:00
%endif
2016-09-17 11:42:07 +00:00
%patch9 -p1
2014-10-08 09:55:11 +00:00
2014-09-01 07:27:07 +00:00
# archlinux arm enhancements
2016-01-31 12:23:18 +00:00
%patch100
2016-08-27 19:45:06 +00:00
%patch101 -p0
2014-09-01 07:27:07 +00:00
2013-09-22 11:50:12 +00:00
%build
2016-08-22 10:45:36 +00:00
# Create the configuration for GN
myconf_gn+=" i s _ d e b u g = f a l s e "
myconf_gn+=" e n a b l e _ n a c l = f a l s e "
myconf_gn+=" p r o p r i e t a r y _ c o d e c s = t r u e "
myconf_gn+=" i s _ c o m p o n e n t _ f f m p e g = t r u e "
myconf_gn+=" u s e _ c u p s = t r u e "
myconf_gn+=" u s e _ g c o n f = t r u e "
myconf_gn+=" u s e _ g t k 3 = t r u e "
myconf_gn+=" u s e _ k e r b e r o s = t r u e "
myconf_gn+=" u s e _ p u l s e a u d i o = t r u e "
myconf_gn+=" i s _ c l a n g = f a l s e "
myconf_gn+=" u s e _ s y s r o o t = f a l s e "
2016-08-22 13:21:57 +00:00
myconf_gn+=" t r e a t _ w a r n i n g s _ a s _ e r r o r s = f a l s e "
2016-09-01 04:22:45 +00:00
myconf_gn+=" f a t a l _ l i n k e r _ w a r n i n g s = f a l s e "
2016-08-22 13:21:57 +00:00
myconf_gn+=" u s e _ a l l o c a t o r = \" n o n e \" "
2016-09-12 08:35:04 +00:00
myconf_gn+=" e n a b l e _ w i d e v i n e = t r u e "
2016-08-22 13:21:57 +00:00
myconf_gn+=" f i e l d t r i a l _ t e s t i n g _ l i k e _ o f f i c i a l _ b u i l d = t r u e "
2013-09-22 16:11:49 +00:00
2016-08-22 13:21:57 +00:00
# Define the Chrome branding in order to get libffmpeg on packman that supports all codecs
2013-11-27 13:59:49 +00:00
%if 0%{?packman_bs}
2016-08-22 10:45:36 +00:00
myconf_gn+=" f f m p e g _ b r a n d i n g = \" C h r o m e \" "
2013-09-22 11:36:12 +00:00
%endif
2016-08-27 18:49:35 +00:00
%ifarch %arm
myconf_gn+=" t a r g e t _ c p u = \" a r m \" "
myconf_gn+=" t a r g e t _ s y s r o o t _ d i r = \" \" "
myconf_gn+=" a r m _ u s e _ n e o n = f a l s e "
myconf_gn+=" a r m _ o p t i o n a l l y _ u s e _ n e o n = f a l s e "
myconf_gn+=" a r m _ u s e _ t h u m b = t r u e "
myconf_gn+=" r e m o v e _ w e b c o r e _ d e b u g _ s y m b o l s = t r u e "
myconf_gn+=" s y m b o l _ l e v e l = 0 "
myconf_gn+=" i s _ c o m p o n e n t _ b u i l d = t r u e "
%endif
2013-01-08 13:27:34 +00:00
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
# Note: these are for the openSUSE Chromium builds ONLY. For your own distribution,
# please get your own set of keys.
2011-09-20 16:10:49 +00:00
2016-08-22 10:45:36 +00:00
google_api_key=" A I z a S y D 1 h T e 8 5 _ a 1 4 k r 1 K s 8 T 3 C e 7 5 r v b R 1 _ D x 7 Q "
google_default_client_id=" 4 1 3 9 8 0 4 4 4 1 . a p p s . g o o g l e u s e r c o n t e n t . c o m "
google_default_client_secret=" K D T R K E Z k 2 j w T _ 7 C D p c m M A - - P "
2013-09-22 11:36:12 +00:00
2016-08-22 10:45:36 +00:00
myconf_gn+=" g o o g l e _ a p i _ k e y = \" $ { g o o g l e _ a p i _ k e y } \" "
myconf_gn+=" g o o g l e _ d e f a u l t _ c l i e n t _ i d = \" $ { g o o g l e _ d e f a u l t _ c l i e n t _ i d } \" "
myconf_gn+=" g o o g l e _ d e f a u l t _ c l i e n t _ s e c r e t = \" $ { g o o g l e _ d e f a u l t _ c l i e n t _ s e c r e t } \" "
third_party/libaddressinput/chromium/tools/update-strings.py
if [ ! -f chrome/test/data/webui/i18n_process_css_test.html ]; then
touch chrome/test/data/webui/i18n_process_css_test.html
fi
tools/gn/bootstrap/bootstrap.py -v --gn-gen-args " $ { m y c o n f _ g n } "
out/Release/gn gen --args=" $ { m y c o n f _ g n } " out/Release
2013-09-22 11:36:12 +00:00
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
2016-08-22 10:45:36 +00:00
ninja -C out/Release third_party/ffmpeg
2013-09-22 16:11:49 +00:00
%else
2016-08-27 18:49:35 +00:00
ninja -j %{ninjaproc} -C out/Release chrome
2012-02-23 18:07:58 +00:00
2013-09-22 16:11:49 +00:00
# Build the required SUID_SANDBOX helper
2016-08-27 18:49:35 +00:00
ninja -j %{ninjaproc} -C out/Release chrome_sandbox
2013-10-01 21:04:43 +00:00
2013-09-22 16:11:49 +00:00
# Build the ChromeDriver test suite
2016-08-27 18:49:35 +00:00
ninja -j %{ninjaproc} -C out/Release chromedriver
2013-09-22 11:36:12 +00:00
%endif
2011-09-20 16:10:49 +00:00
%install
2016-08-22 10:45:36 +00:00
mkdir -p %{buildroot} %{_libdir} /chromium
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
2016-03-08 09:21:20 +00:00
pushd out/Release
2016-08-22 10:45:36 +00:00
cp -av libffmpeg.so %{buildroot} %{_libdir} /chromium/
2013-09-22 16:11:49 +00:00
popd
%else
%ifarch x86_64
2016-01-31 12:23:18 +00:00
mkdir -p %{buildroot} %{_libexecdir} /
2013-09-22 16:11:49 +00:00
%endif
install -m 755 %{SOURCE100} %{buildroot} %{_libdir} /chromium/chromium-generic
# x86_64 capable systems need this
2016-01-31 12:23:18 +00:00
sed -i " s | %{_libexecdir} / c h r o m i u m | %{_libdir} / c h r o m i u m | g " %{buildroot} %{_libdir} /chromium/chromium-generic
2013-09-22 16:11:49 +00:00
#update the password-store settings for each alternative
2016-01-29 07:46:26 +00:00
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 && 0%{?is_opensuse}
2016-01-30 09:29:24 +00:00
sed " s | p a s s w o r d - s t o r e = d e t e c t | p a s s w o r d - s t o r e = k w a l l e t 5 | g " %{buildroot} %{_libdir} /chromium/chromium-generic > %{buildroot} %{_libdir} /chromium/chromium-kde
2016-01-29 07:46:26 +00:00
%else
2016-01-30 09:29:24 +00:00
sed " s | p a s s w o r d - s t o r e = d e t e c t | p a s s w o r d - s t o r e = k w a l l e t | g " %{buildroot} %{_libdir} /chromium/chromium-generic > %{buildroot} %{_libdir} /chromium/chromium-kde
2016-01-29 07:46:26 +00:00
%endif
2016-01-30 09:29:24 +00:00
sed " s | p a s s w o r d - s t o r e = d e t e c t | p a s s w o r d - s t o r e = g n o m e | g " %{buildroot} %{_libdir} /chromium/chromium-generic > %{buildroot} %{_libdir} /chromium/chromium-gnome
2013-09-22 16:11:49 +00:00
mkdir -p %{buildroot} %{_mandir} /man1/
pushd out/Release
2016-01-31 12:23:18 +00:00
# Install the file %{_sysconfdir}/default/chromium which defines the chromium flags
2013-09-22 16:11:49 +00:00
mkdir -p %{buildroot} %{_sysconfdir} /default
install -m 644 %{SOURCE103} %{buildroot} %{_sysconfdir} /default/chromium
2016-01-31 12:23:18 +00:00
# Recent Chromium builds now wants to have the sandbox in the same directory. So let's create a symlink to the one in %{_prefix}/lib
cp -a chrome_sandbox %{buildroot} %{_libexecdir} /
ln -s -f %{_libexecdir} /chrome_sandbox %{buildroot} /%{_libdir} /chromium/chrome-sandbox
2013-09-22 16:11:49 +00:00
2016-08-22 10:45:36 +00:00
cp -a *.bin *.pak locales xdg-mime icudtl.dat %{buildroot} %{_libdir} /chromium/
2013-10-01 14:27:29 +00:00
cp -a chromedriver %{buildroot} %{_libdir} /chromium/
2013-09-22 16:11:49 +00:00
2016-08-27 18:49:35 +00:00
# chromium components
%ifarch %arm
cp -a lib*.so %{buildroot} %{_libdir} /chromium/
%else
cp -av libffmpeg.so %{buildroot} %{_libdir} /chromium/
%endif
2013-09-22 16:11:49 +00:00
# Patch xdg-settings to use the chromium version of xdg-mime as that the system one is not KDE4 compatible
sed " s | x d g - m i m e | %{_libdir} / c h r o m i u m / x d g - m i m e | g " xdg-settings > %{buildroot} %{_libdir} /chromium/xdg-settings
cp -a resources.pak %{buildroot} %{_libdir} /chromium/
cp -a chrome %{buildroot} %{_libdir} /chromium/chromium
cp -a chrome.1 %{buildroot} %{_mandir} /man1/chrome.1
cp -a chrome.1 %{buildroot} %{_mandir} /man1/chromium.1
%fdupes %{buildroot} %{_mandir} /man1/
popd
mkdir -p %{buildroot} %{_datadir} /icons/
pushd %{buildroot} %{_datadir} /icons/
tar -xjf %{SOURCE104}
mv oxygen hicolor
popd
mkdir -p %{buildroot} %{_datadir} /applications/
desktop-file-install --dir %{buildroot} %{_datadir} /applications %{SOURCE101}
mkdir -p %{buildroot} %{_datadir} /gnome-control-center/default-apps/
cp -a %{SOURCE102} %{buildroot} %{_datadir} /gnome-control-center/default-apps/
# link to browser plugin path. Plugin patch doesn't work. Why?
mkdir -p %{buildroot} %{_libdir} /browser-plugins
pushd %{buildroot} %{_libdir} /%{name}
ln -s ../browser-plugins plugins
# Install the master_preferences file
mkdir -p %{buildroot} %{_sysconfdir} /%{name}
install -m 0644 %{SOURCE30} %{buildroot} %{_sysconfdir} /%{name}
install -m 0644 %{SOURCE31} %{buildroot} %{_sysconfdir} /%{name}
# Set the right attributes
chmod 755 %{buildroot} %{_libdir} /%{name} /xdg-settings
chmod 755 %{buildroot} %{_libdir} /%{name} /xdg-mime
2016-01-31 12:23:18 +00:00
# create a dummy target for %{_sysconfdir}/alternatives/chromium
2013-09-22 16:11:49 +00:00
mkdir -p %{buildroot} %{_sysconfdir} /alternatives
mkdir -p %{buildroot} %{_bindir}
touch %{buildroot} %{_sysconfdir} /alternatives/chromium
ln -s -f %{_sysconfdir} /alternatives/chromium %{buildroot} /%{_bindir} /chromium
2013-09-22 11:36:12 +00:00
%endif
2011-09-22 12:16:10 +00:00
2016-01-31 12:23:18 +00:00
%if !0%{?packman_bs}
2011-09-22 09:54:33 +00:00
%pre
2016-01-31 12:23:18 +00:00
if [ -f %{_bindir} /chromium -a ! -L %{_bindir} /chromium ] ; then
rm -f %{_bindir} /chromium
2011-09-20 16:10:49 +00:00
fi
2014-09-01 07:33:18 +00:00
%verify script
2016-01-31 12:23:18 +00:00
%verify _permissions -e %{_libexecdir} /chrome_sandbox
2011-09-23 08:08:34 +00:00
2011-09-20 16:10:49 +00:00
%post
%icon_theme_cache_post
2012-04-13 16:37:20 +00:00
%desktop_database_post
2016-01-31 12:23:18 +00:00
update-alternatives --install %{_bindir} /chromium chromium %{_libdir} /chromium/chromium-generic 10
%set_permissions %{_libexecdir} /chrome_sandbox
2016-08-22 10:45:36 +00:00
/sbin/ldconfig %{_libdir} /chromium
2011-09-20 16:10:49 +00:00
%postun
%icon_theme_cache_postun
2012-04-13 16:37:20 +00:00
%desktop_database_postun
2012-06-25 09:58:13 +00:00
if [ $1 -eq 0 ]; then
2016-01-31 12:23:18 +00:00
update-alternatives --remove chromium %{_libdir} /chromium/chromium-generic
2012-06-25 09:58:13 +00:00
fi
2016-08-22 10:45:36 +00:00
/sbin/ldconfig %{_libdir} /chromium
2011-09-20 16:10:49 +00:00
2016-01-31 12:23:18 +00:00
%post desktop-kde
update-alternatives --install %{_bindir} /chromium chromium %{_libdir} /chromium/chromium-kde 15
2011-09-20 16:10:49 +00:00
2013-08-06 10:57:30 +00:00
%preun desktop-kde
2016-01-31 12:23:18 +00:00
if [ $1 -eq 0 ]; then
update-alternatives --remove chromium %{_libdir} /chromium/chromium-kde
2012-06-19 13:32:33 +00:00
fi
2011-09-20 16:10:49 +00:00
%post desktop-gnome
2016-01-31 12:23:18 +00:00
update-alternatives --install %{_bindir} /chromium chromium %{_libdir} /chromium/chromium-gnome 15
2011-09-20 16:10:49 +00:00
%postun desktop-gnome
2016-01-31 12:23:18 +00:00
if [ $1 -eq 0 ]; then
update-alternatives --remove chromium %{_libdir} /chromium/chromium-gnome
2012-06-19 13:32:33 +00:00
fi
2016-01-31 12:23:18 +00:00
%endif
2011-09-20 16:10:49 +00:00
# Files!
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
2016-08-22 10:45:36 +00:00
%post ffmpeg
/sbin/ldconfig %{_libdir} /chromium
%postun ffmpeg
/sbin/ldconfig %{_libdir} /chromium
2013-09-22 16:11:49 +00:00
%files ffmpeg
%defattr (-,root,root,-)
%dir %{_libdir} /chromium
2016-08-22 10:45:36 +00:00
%{_libdir} /chromium/libffmpeg.so
2013-09-22 16:11:49 +00:00
%else
2011-09-20 16:10:49 +00:00
%files
%defattr (-,root,root,-)
2016-01-31 12:23:18 +00:00
%verify (not mode) %{_libexecdir} /chrome_sandbox
2011-09-20 16:10:49 +00:00
%doc AUTHORS LICENSE
%config %{_sysconfdir} /%{name}
2013-04-10 20:44:14 +00:00
%config (noreplace) %{_sysconfdir} /default/chromium
2011-09-20 16:10:49 +00:00
%dir %{_datadir} /gnome-control-center
%dir %{_datadir} /gnome-control-center/default-apps
2013-07-26 04:38:13 +00:00
%{_libdir} /chromium/
2011-09-20 16:10:49 +00:00
%{_mandir} /man1/chrom*
%{_datadir} /applications/*.desktop
%{_datadir} /gnome-control-center/default-apps/chromium-browser.xml
%{_datadir} /icons/hicolor/
2016-01-31 12:23:18 +00:00
%{_libexecdir} /chrome_sandbox
2016-08-22 18:51:51 +00:00
%exclude %{_libdir} /chromium/libffmpeg.so
2013-07-26 04:38:13 +00:00
%exclude %{_libdir} /chromium/chromium-kde
%exclude %{_libdir} /chromium/chromium-gnome
2013-10-01 21:04:43 +00:00
%exclude %{_libdir} /chromium/chromedriver
2016-01-31 12:23:18 +00:00
%{_bindir} /chromium
%ghost %{_sysconfdir} /alternatives/chromium
2011-09-20 16:10:49 +00:00
2012-11-20 14:12:54 +00:00
%files ffmpegsumo
%defattr (-,root,root,-)
2016-08-22 10:45:36 +00:00
%{_libdir} /chromium/libffmpeg.so
2012-11-20 14:12:54 +00:00
2011-09-20 16:10:49 +00:00
%files desktop-kde
2016-01-31 12:23:18 +00:00
%defattr (-,root,root)
%ghost %{_sysconfdir} /alternatives/chromium
2011-09-20 16:10:49 +00:00
%attr (755, root, root) %{_libdir} /chromium/chromium-kde
%files desktop-gnome
2016-01-31 12:23:18 +00:00
%defattr (-,root,root)
%ghost %{_sysconfdir} /alternatives/chromium
2011-09-20 16:10:49 +00:00
%attr (755, root, root) %{_libdir} /chromium/chromium-gnome
2012-04-18 14:02:36 +00:00
%files -n chromedriver
%defattr (-,root,root,-)
2013-10-01 14:27:29 +00:00
%{_libdir} /chromium/chromedriver
2013-09-22 16:11:49 +00:00
%endif
2012-04-18 14:02:36 +00:00
2011-09-20 16:10:49 +00:00
%changelog