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
2013-01-27 09:26:35 +00:00
%define chromium_no_dlopen 1
2011-09-20 16:10:49 +00:00
Name : chromium
2016-08-05 16:37:22 +00:00
Version : 52.0.2743.116
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
2014-07-22 09:59:29 +00:00
Source997 : courgette.tar.xz
Source998 : depot_tools.tar.xz
Source999 : gn-binaries.tar.xz
2011-09-20 16:10:49 +00:00
## 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
2014-08-28 11:37:18 +00:00
Patch4 : chromium-master-prefs-path.patch
2012-11-20 14:12:54 +00:00
# PATCH-FIX-OPENSUSE Fix some includes specifically for the GCC version used
2014-08-28 11:37:18 +00:00
Patch5 : chromium-gcc-fixes.patch
2011-12-01 12:23:55 +00:00
# PATCH-FIX-UPSTREAM Add more charset aliases
2014-08-28 11:37:18 +00:00
Patch6 : chromium-more-codec-aliases.patch
2012-01-26 08:17:54 +00:00
# PATCH-FIX-OPENSUSE Compile the sandbox with -fPIE settings
2014-08-28 11:37:18 +00:00
Patch7 : chromium-sandbox-pie.patch
2013-05-05 18:58:01 +00:00
# PATCH-FIX-OPENSUSE Adjust ldflags for better building
2014-08-28 11:37:18 +00:00
Patch8 : adjust-ldflags-no-keep-memory.patch
2015-06-17 19:57:52 +00:00
# PATCH-FIX-OPENSUSE gcc50-fixes.diff - Fix the GCC version detection
Patch10 : gcc50-fixes.diff
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
Patch11 : 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
Patch12 : 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
Patch14 : 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-06-23 08:22:49 +00:00
Patch16 : gcc60-fixes.diff
2014-09-01 07:27:07 +00:00
# archlinux arm enhancement patches
Patch100 : arm-webrtc-fix.patch
Patch101 : chromium-arm-r0.patch
2016-01-31 12:23:18 +00:00
BuildRequires : SDL-devel
2011-09-20 16:10:49 +00:00
BuildRequires : alsa-devel
BuildRequires : bison
BuildRequires : cups-devel
BuildRequires : desktop-file-utils
2016-01-31 12:23:18 +00:00
BuildRequires : dirac-devel >= 1.0.0
2011-09-20 16:10:49 +00:00
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
2013-03-27 21:38:42 +00:00
BuildRequires : hicolor-icon-theme
2011-09-20 16:10:49 +00:00
BuildRequires : hunspell-devel
2016-01-31 12:23:18 +00:00
BuildRequires : imlib2-devel
2013-12-09 07:36:53 +00:00
BuildRequires : krb5
2013-12-10 23:03:50 +00:00
BuildRequires : krb5-devel
2012-10-16 13:15:09 +00:00
BuildRequires : libbz2-devel
2014-01-16 21:19:01 +00:00
BuildRequires : libcap-devel
2016-01-31 12:23:18 +00:00
BuildRequires : libdc1394
BuildRequires : libdc1394-devel
2014-01-16 21:19:01 +00:00
BuildRequires : libdrm-devel
2012-03-06 09:34:34 +00:00
BuildRequires : libelf-devel
2012-08-23 09:49:46 +00:00
BuildRequires : libexpat-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-01-31 12:23:18 +00:00
BuildRequires : libgsm
BuildRequires : libgsm-devel
BuildRequires : libjack-devel
2016-03-04 10:55:57 +00:00
BuildRequires : libjpeg-devel
2016-01-31 12:23:18 +00:00
BuildRequires : libogg-devel
BuildRequires : liboil-devel >= 0.3.15
2015-12-04 17:28:01 +00:00
BuildRequires : libopenssl-devel
2012-03-06 09:34:34 +00:00
BuildRequires : libpulse-devel
2016-01-31 12:23:18 +00:00
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
2011-09-20 16:10:49 +00:00
BuildRequires : python-xml
2016-01-31 12:23:18 +00:00
BuildRequires : schroedinger-devel
BuildRequires : slang-devel
2011-09-20 16:10:49 +00:00
BuildRequires : sqlite3-devel
2016-01-31 12:23:18 +00:00
BuildRequires : texinfo
2011-09-20 16:10:49 +00:00
BuildRequires : update-desktop-files
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
2013-03-27 21:38:42 +00:00
BuildRequires : perl(Switch)
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)
2014-09-01 07:27:07 +00:00
BuildRequires : pkgconfig(libcrypto)
BuildRequires : pkgconfig(libexif)
2016-03-08 09:21:20 +00:00
BuildRequires : pkgconfig(libffi)
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
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)
Recommends: chromium-ffmpeg
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}
# There is no v8 for ppc and thus chromium won't run on ppc. For aarch64 certain buildrequires are missing (e.g. valgrind)
ExcludeArch : aarch64 ppc ppc64 ppc64le
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
%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)
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
2015-07-29 09:14:11 +00:00
Requires : %{name} = %{version}
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-01-31 12:23:18 +00:00
%setup -q -a 999 -a 998
%patch1
%patch6
%patch4
%patch5
%patch7
%patch8
2015-06-17 20:25:36 +00:00
%if 0%{?suse_version} > 1320
2016-01-31 12:23:18 +00:00
%patch10
2015-06-17 20:03:31 +00:00
%endif
2016-02-06 09:14:09 +00:00
%patch11 -p1
2015-12-05 10:45:51 +00:00
%patch12 -p1
2016-07-21 19:00:17 +00:00
# Disable this patch now. Upstream has made some changes, so lets see if the error still occurs
#patch14
2016-06-23 08:41:04 +00:00
%if 0%{?suse_version} > 1320
2016-06-23 08:11:56 +00:00
%patch16 -p0
2016-06-23 08:41:04 +00:00
%endif
2014-10-08 09:55:11 +00:00
2013-10-01 09:58:35 +00:00
#Upstream fixes
2011-09-20 16:10:49 +00:00
2014-09-01 07:27:07 +00:00
# archlinux arm enhancements
2016-01-31 12:23:18 +00:00
%patch100
%patch101
2014-09-01 07:27:07 +00:00
2014-04-08 21:02:33 +00:00
export PATH=" $ P A T H " :`pwd`/depot_tools
2013-09-22 11:50:12 +00:00
%build
PARSED_OPT_FLAGS=`echo \'%{optflags} -D_GNU_SOURCE\' | sed " s / / ' , / g " | sed " s / ' , / ' , ' / g " `
2013-09-22 16:11:49 +00:00
#'
2013-09-22 11:50:12 +00:00
sed -i " s | ' - O < ( r e l e a s e _ o p t i m i z e ) ' | $ P A R S E D _ O P T _ F L A G S | g " build/common.gypi
2013-09-22 11:51:17 +00:00
myconf+=" - D w e r r o r =
2013-09-22 11:36:12 +00:00
-Dlinux_sandbox_chrome_path=%{_libdir} /chromium/chromium
2015-06-17 09:14:38 +00:00
-Denable_hotwording=0
2013-09-22 11:36:12 +00:00
-Duse_system_ffmpeg=0
-Dbuild_ffmpegsumo=1
2016-02-29 12:38:31 +00:00
-Duse_system_libjpeg=1
2013-11-27 13:59:49 +00:00
-Dproprietary_codecs=1
2013-09-22 11:36:12 +00:00
-Dremove_webcore_debug_symbols=1
-Dlogging_like_official_build=1
2016-01-31 12:23:18 +00:00
-Dlinux_fpic=1
2014-09-01 07:33:18 +00:00
-Dcomponent=shared_library
2015-12-12 11:44:44 +00:00
-Dtoolkit_uses_gtk=0
2016-01-31 12:23:18 +00:00
-Denable_pepper_cdms=1
-Denable_webrtc=1
2015-12-12 11:44:44 +00:00
-Denable_widevine=1"
2013-09-22 16:11:49 +00:00
2013-11-27 13:59:49 +00:00
%if 0%{?packman_bs}
2016-03-08 09:21:20 +00:00
myconf+=" - D f f m p e g _ b r a n d i n g = C h r o m e "
2013-11-27 13:59:49 +00:00
%endif
2014-10-03 19:31:50 +00:00
myconf+=" - D d i s a b l e _ n a c l = 1 "
2013-11-07 11:19:59 +00:00
2013-09-22 11:36:12 +00:00
%ifarch x86_64
2015-12-29 20:42:58 +00:00
myconf+=" - D t a r g e t _ a r c h = x 6 4
-Ddisable_sse2=0"
2015-12-11 09:08:28 +00:00
%else
2015-12-12 11:44:44 +00:00
myconf+=" - D b i n u t i l s _ d i r = t h i r d _ p a r t y / b i n u t i l s / L i n u x _ i a 3 2 / R e l e a s e / b i n
2016-02-29 12:38:31 +00:00
-Ddisable_fatal_linker_warnings=1
2015-12-29 20:42:58 +00:00
-Ddisable_sse2=1"
2013-09-22 11:36:12 +00:00
%endif
2014-09-01 07:27:07 +00:00
%ifarch %arm
myconf+=" - D t a r g e t _ a r c h = a r m
2014-10-03 19:31:50 +00:00
-Dsysroot=
-Ddisable_nacl=1"
2014-09-01 07:27:07 +00:00
%endif
%ifarch armv6hl armv7hl
myconf+=" - D a r m _ f l o a t _ a b i = h a r d "
%endif
2016-03-05 07:38:51 +00:00
myconf+=" - D c l a n g = 0
-Duse_sysroot=0"
2015-12-04 17:28:01 +00:00
2013-09-21 14:41:52 +00:00
%if 0%{?chromium_no_dlopen}
2016-01-31 12:23:18 +00:00
myconf+=" - D u s e _ p u l s e a u d i o = 1
-Dlinux_link_libpci=1
2015-12-04 17:28:01 +00:00
-Dlinux_link_gnome_keyring=1
2016-01-31 12:23:18 +00:00
-Dlinux_link_gsettings=1
2015-12-04 17:28:01 +00:00
-Dlinux_link_libgps=1"
2013-09-24 13:06:36 +00:00
%ifnarch %ix86
2016-01-31 12:23:18 +00:00
#myconf+=" -Dlinux_link_kerberos=1"
2013-12-08 12:37:02 +00:00
%endif
2013-09-24 13:06:36 +00:00
%endif
2013-12-08 12:37:02 +00:00
%if 0%{?suse_version} > 1310
2013-12-09 17:18:48 +00:00
myconf+=" - D p y t h o n _ v e r = 2 . 7 "
%ifarch x86_64
myconf+=" - D s y s t e m _ l i b d i r = l i b 6 4 "
%endif
2013-09-21 14:41:52 +00:00
%endif
2014-04-08 21:02:33 +00:00
myconf+=" - D j a v a s c r i p t _ e n g i n e = v 8 "
2016-01-31 12:23:18 +00:00
myconf+=" - D l i n u x _ u s e _ g o l d _ b i n a r y = 0
2014-04-08 21:02:33 +00:00
-Dlinux_use_gold_flags=0"
2013-09-22 16:11:49 +00:00
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-01-31 12:23:18 +00:00
myconf+=" - D g o o g l e _ a p i _ k e y = 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
-Dgoogle_default_client_id=4139804441.apps.googleusercontent.com
2013-09-25 18:46:00 +00:00
-Dgoogle_default_client_secret=KDTRKEZk2jwT_7CDpcmMA--P"
2013-09-22 11:36:12 +00:00
2013-09-22 11:50:12 +00:00
build/linux/unbundle/replace_gyp_files.py $myconf
2016-03-08 09:21:20 +00:00
export GYP_GENERATORS='ninja'
2013-09-22 11:36:12 +00:00
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
2016-03-08 09:21:20 +00:00
./build/gyp_chromium build/all.gyp --no-parallel --depth . $myconf
ninja -C out/Release ffmpeg
2013-09-22 16:11:49 +00:00
%else
./build/gyp_chromium build/all.gyp --depth . $myconf
2016-08-12 08:26:38 +00:00
ninja -j 4 -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
ninja -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
2013-10-01 14:27:29 +00:00
ninja -C out/Release chromedriver
2013-09-22 11:36:12 +00:00
%endif
2011-09-20 16:10:49 +00:00
%install
2015-07-21 19:41:19 +00:00
mkdir -p %{buildroot} %{_libdir} /chromium/lib
2013-09-22 16:11:49 +00:00
%if 0%{?packman_bs}
2016-03-08 09:21:20 +00:00
pushd out/Release
cp -av lib/*.so %{buildroot} %{_libdir} /chromium/lib/
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
2015-10-16 11:55:19 +00:00
cp -a *.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
# 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
2016-01-31 12:23:18 +00:00
cp -a *_blob.bin %{buildroot} %{_libdir} /chromium/
2013-09-22 16:11:49 +00:00
%fdupes %{buildroot} %{_mandir} /man1/
2014-09-01 07:27:07 +00:00
# chromium components
mkdir -p %{buildroot} %{_libdir} /chromium/lib/
cp -av lib/*.so %{buildroot} %{_libdir} /chromium/lib/
2013-09-22 16:11:49 +00:00
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
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
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}
%files ffmpeg
%defattr (-,root,root,-)
%dir %{_libdir} /chromium
2015-07-21 19:41:19 +00:00
%dir %{_libdir} /chromium/lib
%{_libdir} /chromium/lib/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
2015-07-21 19:41:19 +00:00
%exclude %{_libdir} /chromium/lib/*ffmpeg*.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,-)
2015-07-21 19:41:19 +00:00
%{_libdir} /chromium/lib/*ffmpeg*.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