]> git.pld-linux.org Git - packages/google-chrome.git/blobdiff - google-chrome.spec
- up to 54.0.2840.71
[packages/google-chrome.git] / google-chrome.spec
index 20505f8b5c533dc8665f6a648d85214cb7467c1b..f8143b1d437c3bbfad289d4083da98cb230efd38 100644 (file)
@@ -1,41 +1,38 @@
 # NOTE
 # - to look and update to new version, use update-source.sh script
+#
+# Conditional build:
+%bcond_with    ffmpegsumo      # using ffmpegsumo
 
-%define                svnrev  1
-%define                flashv  11.9.900.117
-#define                rel             %{nil}
 %define                state   stable
+%if "%{state}" == "beta" || "%{state}" == "unstable"
+%define                gcsuffix        -%{state}
+%endif
 Summary:       Google Chrome
 Name:          google-chrome
-Version:       30.0.1599.114
-Release:       %{svnrev}%{?rel:.%{rel}}
+Version:       54.0.2840.71
+Release:       1
 License:       Multiple, see http://chrome.google.com/
 Group:         Applications/Networking
-Source0:       http://dl.google.com/linux/chrome/rpm/stable/i386/%{name}-%{state}-%{version}-%{svnrev}.i386.rpm
-# NoSource0-md5:       4a41fc88fb23feb84ce8629f6511c45b
+Source0:       http://dl.google.com/linux/chrome/rpm/stable/x86_64/%{name}-%{state}-%{version}-%{release}.x86_64.rpm
+# NoSource0-md5:       ec1983c69c69bbddb405a6b4cf92280c
 NoSource:      0
-Source1:       http://dl.google.com/linux/chrome/rpm/stable/x86_64/%{name}-%{state}-%{version}-%{svnrev}.x86_64.rpm
-# NoSource1-md5:       3691041730c5321ef075c3cf63529155
-NoSource:      1
-Source2:       %{name}.sh
-Source4:       find-lang.sh
-Patch0:                chrome-desktop.patch
+Source1:       %{name}.sh
+Source2:       find-lang.sh
 URL:           http://chrome.google.com/
 BuildRequires: rpm-utils
 BuildRequires: rpmbuild(macros) >= 1.453
 BuildRequires: sed >= 4.0
 Requires:      browser-plugins >= 2.0
+Requires:      cpuinfo(sse2)
 # crashes if no fontconfig font present
 Requires:      fonts-Type1-urw
 Requires:      hicolor-icon-theme
+# https://www.phoronix.com/scan.php?page=news_item&px=Google-Chrome-TSYNC-Kernel
+Requires:      uname(release) >= 3.17
 Requires:      xdg-utils >= 1.0.2-4
-Suggests:      browser-plugin-adobe-flash
-Suggests:      browser-plugin-chrome-pdf
 Provides:      wwwbrowser
-# add conflicts to trigger their update when main package is updated
-Conflicts:     browser-plugin-adobe-flash < %{flashv}-%{!?rel:1}%{?rel:%{rel}}
-Conflicts:     browser-plugin-chrome-pdf < %{version}-%{release}
-ExclusiveArch: %{ix86} %{x8664}
+ExclusiveArch:  %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %{expand:%%define      crver %{version}}
@@ -46,11 +43,9 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                no_install_post_strip   1
 
 %define                ffmpeg_caps     libffmpegsumo.so
-%define                flash_caps      libpepflashplayer.so
-%define                chrome_caps     libpdf.so libppGoogleNaClPluginChrome.so
 
 # list of script capabilities (regexps) not to be used in Provides
-%define                _noautoprov             %{ffmpeg_caps} %{flash_caps} %{chrome_caps}
+%define                _noautoprov             %{ffmpeg_caps}
 # do not require them either
 %define                _noautoreq              %{_noautoprov}
 
@@ -80,105 +75,55 @@ he, hi, hr, hu, id, it, ja, kn, ko, lt, lv, ml, mr, nb, nl, or, pl,
 pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, ta, te, th, tr, uk, vi, zh-CN,
 zh-TW
 
-%package -n browser-plugin-chrome-pdf
-Summary:       Chrome PDF Viewer
-Summary(pl.UTF-8):     Wtyczka PDF z Google Chrome
-Group:         X11/Applications/Graphics
-Requires:      browser-plugins >= 2.0
-Conflicts:     google-chrome < 19.0.1084.52
-
-%description -n browser-plugin-chrome-pdf
-Google Chrome PDF Viewer.
-
-%description -n browser-plugin-chrome-pdf -l pl.UTF-8
-Wtyczka PDF z Google Chrome.
-
-# IMPORTANT: keep flash plugin defined as last package
-%package -n browser-plugin-adobe-flash
-Summary:       Adobe Flash plugin from Google Chrome
-Summary(pl.UTF-8):     Wtyczka Adobe Flash z Google Chrome
-Version:       %{flashv}
-Release:       %{!?rel:1}%{?rel:%{rel}}
-License:       Free to use, non-distributable
-Group:         X11/Applications/Multimedia
-Requires:      browser-plugins >= 2.0
-Conflicts:     google-chrome < 19.0.1084.52
-
-%description -n browser-plugin-adobe-flash
-Adobe Flash plugin from Google Chrome, which is not available in
-Chromium.
-
-%description -n browser-plugin-adobe-flash -l pl.UTF-8
-Wtyczka Adobe Flash z Google Chrome, która nie jest dostępna w
-Chromium.
-
 %prep
 %setup -qcT
-%ifarch %{ix86}
 SOURCE=%{S:0}
-%endif
-%ifarch %{x8664}
-SOURCE=%{S:1}
-%endif
 
 V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
 R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE)
-if [ version:$V != version:%{crver} -o svnrev:$R != svnrev:%{svnrev} ]; then
+if [ version:$V != version:%{crver} -o release:$R != release:%{release} ]; then
        exit 1
 fi
 rpm2cpio $SOURCE | cpio -i -d
 
-mv opt/google/chrome .
+mv opt/google/chrome%{?gcsuffix} .
 mv usr/share/man/man1/* .
 mv usr/share/gnome-control-center/default-apps .
-mv chrome/default-app-block .
-mv chrome/product_logo_*.{png,xpm} .
-mv chrome/google-chrome.desktop .
-mv chrome/google-chrome .
-chmod a+x chrome/lib*.so*
-
-# separate to subpackage
-install -d browser-plugins
-mv chrome/libpdf.so browser-plugins
-mv chrome/PepperFlash browser-plugins
-chmod a+rx browser-plugins/PepperFlash/*.so
+mv chrome%{?gcsuffix}/default-app-block .
+mv chrome%{?gcsuffix}/product_logo_*.{png,xpm} .
+mv usr/share/applications/google-chrome%{?gcsuffix}.desktop .
+mv chrome%{?gcsuffix}/google-chrome* .
+chmod a+x chrome%{?gcsuffix}/lib*.so*
 
 # included in gnome-control-center-2.28.1-3
-rm default-app-block default-apps/google-chrome.xml
+rm default-app-block default-apps/google-chrome%{?gcsuffix}.xml
 
 # xdg-utils snapshot required
-rm chrome/xdg-settings
-rm chrome/xdg-mime
+rm chrome%{?gcsuffix}/xdg-settings
+rm chrome%{?gcsuffix}/xdg-mime
 
 [ -f *.1.gz ] && gzip -d *.1.gz
 
-%patch0 -p1
-
-%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
-%{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome.desktop
-%{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome.desktop
+%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE2} > find-lang.sh
+%{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome%{?gcsuffix}.desktop
+%{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome%{?gcsuffix}.desktop
+%{__sed} -i 's;xhtml_xml;xhtml+xml;' google-chrome%{?gcsuffix}.desktop
+%{__sed} -i 's#google-chrome-\(stable\|beta\|unstable\)#google-chrome#g' google-chrome%{?gcsuffix}.desktop
 
 %build
-v=$(awk -F'"' '/version/{print $4}' browser-plugins/PepperFlash/manifest.json)
-if [ "$v" != "%{flashv}" ]; then
-       : wrong version
-       exit 1
-fi
-
-# create extra file, for simplier scripting in chromium-browser.sh
-echo "version=%{flashv}" > browser-plugins/PepperFlash/manifest.ver
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes} \
+       $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
 
-install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
+install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
 %{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
-cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
-cp -p google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -a chrome%{?gcsuffix}/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -p google-chrome%{?gcsuffix}.1 $RPM_BUILD_ROOT%{_mandir}/man1/google-chrome.1
 # for google-chrome --help
 echo ".so google-chrome.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome.1
-cp -p google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp -p google-chrome%{?gcsuffix}.desktop $RPM_BUILD_ROOT%{_desktopdir}/google-chrome.desktop
 
 for icon in product_logo_*.png; do
        size=${icon##product_logo_}
@@ -188,9 +133,6 @@ for icon in product_logo_*.png; do
        cp -p $icon $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
 done
 
-install -d $RPM_BUILD_ROOT%{_browserpluginsdir}
-cp -a browser-plugins/* $RPM_BUILD_ROOT%{_browserpluginsdir}
-
 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
 
 # binary needs to be at that specific location, or it will abort:
@@ -199,15 +141,7 @@ cp -a browser-plugins/* $RPM_BUILD_ROOT%{_browserpluginsdir}
 install -d $RPM_BUILD_ROOT/opt/google
 # see if CHROME_DEVEL_SANDBOX env var helps
 # content/browser/browser_main_loop.cc
-ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT/opt/google/chrome
-
-# official rpm just add libudev.so.0 -> libudev.so.1 symlink, so we use similar hack here
-if grep -qE "libudev\.so\.0" $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome; then
-       %{__sed} -i -e 's#libudev\.so\.0#libudev.so.1#g' $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
-else
-       echo "Hack no longer needed? No longer linked with libudev.so.0 ?" >&2
-       exit 1
-fi
+ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT/opt/google/chrome%{?gcsuffix}
 
 # find locales
 %find_lang %{name}.lang
@@ -227,56 +161,6 @@ if [ "$1" = 0 ]; then
        %update_browser_plugins
 fi
 
-%post -n browser-plugin-adobe-flash
-%update_browser_plugins
-
-%postun -n browser-plugin-adobe-flash
-if [ "$1" = 0 ]; then
-       %update_browser_plugins
-fi
-
-%post -n browser-plugin-chrome-pdf
-%update_browser_plugins
-
-%postun -n browser-plugin-chrome-pdf
-if [ "$1" = 0 ]; then
-       %update_browser_plugins
-fi
-
-# FIXME: chrome *needs* it to be in application dir. add symlink until it can load from other places
-# FIXME: link PepperFlash, browser-plugins ignores subdirs, and currently nothing else than chrome browsers can do pepper
-%triggerin -n browser-plugin-adobe-flash -- google-chrome
-test -L %{_libdir}/%{name}/PepperFlash || ln -sf %{_browserpluginsdir}/PepperFlash %{_libdir}/%{name}/PepperFlash
-
-%triggerun -n browser-plugin-adobe-flash -- google-chrome
-if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/%{name}/PepperFlash ]; then
-       rm -f %{_libdir}/%{name}/PepperFlash
-fi
-
-%triggerin -n browser-plugin-chrome-pdf -- google-chrome
-test -L %{_libdir}/%{name}/libpdf.so || ln -sf plugins/libpdf.so %{_libdir}/%{name}/libpdf.so
-
-%triggerun -n browser-plugin-chrome-pdf -- google-chrome
-if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/%{name}/libpdf.so ]; then
-       rm -f %{_libdir}/%{name}/libpdf.so
-fi
-
-%triggerin -n browser-plugin-adobe-flash -- chromium-browser-bin
-test -L %{_libdir}/chromium-browser-bin/PepperFlash || ln -sf %{_browserpluginsdir}/PepperFlash %{_libdir}/chromium-browser-bin/PepperFlash
-
-%triggerun -n browser-plugin-adobe-flash -- chromium-browser-bin
-if [ "$1" = "0" ] || [ "$2" = "0" ] && [ -L %{_libdir}/chromium-browser-bin/PepperFlash ]; then
-       rm -f %{_libdir}/chromium-browser-bin/PepperFlash
-fi
-
-%triggerin -n browser-plugin-chrome-pdf -- chromium-browser-bin
-test -L %{_libdir}/chromium-browser-bin/libpdf.so || ln -sf plugins/libpdf.so %{_libdir}/chromium-browser-bin/libpdf.so
-
-%triggerun -n browser-plugin-chrome-pdf -- chromium-browser-bin
-if [ "$1" = "0" ] || [ "$2" = "0" ] && [-L %{_libdir}/chromium-browser-bin/libpdf.so ]; then
-       rm -f %{_libdir}/chromium-browser-bin/libpdf.so
-fi
-
 %files
 %defattr(644,root,root,755)
 
@@ -289,23 +173,25 @@ fi
 %{_iconsdir}/hicolor/*/apps/%{name}.png
 
 %dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/lib
-%{_libdir}/%{name}/chrome.pak
+%{_libdir}/%{name}/icudtl.dat
+%{_libdir}/%{name}/chrome_*_percent.pak
 %{_libdir}/%{name}/resources.pak
-%{_libdir}/%{name}/chrome_100_percent.pak
+%{_libdir}/%{name}/natives_blob.bin
+%{_libdir}/%{name}/snapshot_blob.bin
 %dir %{_libdir}/%{name}/locales
 %{_libdir}/%{name}/locales/en-US.pak
+%{_libdir}/%{name}/locales/fake-bidi.pak
 %dir %{_libdir}/%{name}/plugins
+%dir %{_datadir}/%{name}
+# The path to the external extension <id>.json files.
+# see https://chromium.googlesource.com/chromium/chromium/+/trunk/chrome/common/chrome_paths.cc
+%dir %{_datadir}/%{name}/extensions
 %{_libdir}/%{name}/default_apps
 %{_libdir}/%{name}/themes
 %attr(755,root,root) %{_libdir}/%{name}/chrome
-%attr(755,root,root) %{_libdir}/%{name}/lib/libpeerconnection.so
 # These unique permissions are intentional and necessary for the sandboxing
 %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
 
-# Native Client plugin, to use launch with --enable-nacl
-%attr(755,root,root) %{_libdir}/%{name}/libppGoogleNaClPluginChrome.so
-
 # nacl
 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper
 %attr(755,root,root) %{_libdir}/%{name}/nacl_helper_bootstrap
@@ -316,22 +202,13 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/libwidevinecdmadapter.so
 
 # ffmpeg libs
+%if %{with ffmpegsumo}
 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
+%endif
 
 # hack
 %dir /opt/google
-/opt/google/chrome
+/opt/google/chrome%{?gcsuffix}
 
 %files l10n -f %{name}.lang
 %defattr(644,root,root,755)
-
-%files -n browser-plugin-chrome-pdf
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_browserpluginsdir}/libpdf.so
-
-%files -n browser-plugin-adobe-flash
-%defattr(644,root,root,755)
-%dir %{_browserpluginsdir}/PepperFlash
-%{_browserpluginsdir}/PepperFlash/manifest.json
-%{_browserpluginsdir}/PepperFlash/manifest.ver
-%attr(755,root,root) %{_browserpluginsdir}/PepperFlash/libpepflashplayer.so
This page took 0.040479 seconds and 4 git commands to generate.