packages: google-chrome/find-lang.sh (NEW), google-chrome/google-chrome.sh ...
glen
glen at pld-linux.org
Wed Dec 9 15:48:33 CET 2009
Author: glen Date: Wed Dec 9 14:48:33 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- google chrome browser v4.0.249.30, based on chromium-browser-bin package
---- Files affected:
packages/google-chrome:
find-lang.sh (NONE -> 1.1) (NEW), google-chrome.sh (NONE -> 1.1) (NEW), google-chrome.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/google-chrome/find-lang.sh
diff -u /dev/null packages/google-chrome/find-lang.sh:1.1
--- /dev/null Wed Dec 9 15:48:33 2009
+++ packages/google-chrome/find-lang.sh Wed Dec 9 15:48:28 2009
@@ -0,0 +1,52 @@
+#!/bin/sh
+PROG=${0##*/}
+if [ $# = 2 ]; then
+ # for using same syntax as rpm own find-lang
+ RPM_BUILD_ROOT=$1
+ shift
+fi
+dir=$RPM_BUILD_ROOT at localedir@/locales
+langfile=$1
+tmp=$(mktemp) || exit 1
+rc=0
+
+find $dir -name '*.pak' > $tmp
+
+echo '%defattr(644,root,root,755)' > $langfile
+while read file; do
+ lang=${file##*/}
+ lang=${lang%.pak}
+ case "$lang" in
+ zh-TW)
+ lang=zh_TW
+ ;;
+ zh-CN)
+ lang=zh_CN
+ ;;
+ en-US|en-GB)
+ lang=en
+ ;;
+ pt-BR)
+ lang=pt_BR
+ ;;
+ pt-PT)
+ lang=pt
+ ;;
+ es-419)
+ lang=es
+ ;;
+ *-*)
+ echo >&2 "ERROR: Need mapping for $lang!"
+ rc=1
+ ;;
+ esac
+ echo "%lang($lang) ${file#$RPM_BUILD_ROOT}" >> $langfile
+done < $tmp
+
+if [ "$(egrep -v '(^%defattr|^$)' $langfile | wc -l)" -le 0 ]; then
+ echo >&2 "$PROG: Error: international files not found!"
+ rc=1
+fi
+
+rm -f $tmp
+exit $rc
================================================================
Index: packages/google-chrome/google-chrome.sh
diff -u /dev/null packages/google-chrome/google-chrome.sh:1.1
--- /dev/null Wed Dec 9 15:48:33 2009
+++ packages/google-chrome/google-chrome.sh Wed Dec 9 15:48:28 2009
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Always use our ffmpeg libs.
+# Also symlinks for nss/nspr libs can be found from our dir.
+export LD_LIBRARY_PATH=@libdir@${LD_LIBRARY_PATH:+:"$LD_LIBRARY_PATH"}
+
+# for to find xdg-settings
+export PATH=@libdir@${PATH:+:"$PATH"}
+
+# chromium needs /dev/shm being mounted
+m=$(awk '$2 == "/dev/shm" && $3 == "tmpfs" {print}' /proc/mounts)
+if [ -z "$m" ]; then
+ cat >&2 <<-'EOF'
+ Chromium needs /dev/shm being mounted for Shared Memory access.
+
+ To do so, invoke (as root):
+ mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm
+
+ EOF
+fi
+
+exec @libdir@/chrome "$@"
================================================================
Index: packages/google-chrome/google-chrome.spec
diff -u /dev/null packages/google-chrome/google-chrome.spec:1.1
--- /dev/null Wed Dec 9 15:48:34 2009
+++ packages/google-chrome/google-chrome.spec Wed Dec 9 15:48:28 2009
@@ -0,0 +1,149 @@
+# $Revision$, $Date$
+Summary: Google Chrome
+Name: google-chrome
+Version: 4.0.249.30
+Release: 0.1
+License: Multiple, see http://chrome.google.com/
+Group: Applications/Networking
+Source0: http://dl.google.com/linux/direct/%{name}-beta_current_i386.rpm
+# Source0-md5: bf85e5d8d366fbe06606ab7bb5dadeac
+Source1: http://dl.google.com/linux/direct/%{name}-beta_current_x86_64.rpm
+# Source1-md5: 7e04f041372489e5249ccb7f9b661186
+Source2: %{name}.sh
+Source4: find-lang.sh
+URL: http://chrome.google.com/
+BuildRequires: rpm-utils
+BuildRequires: rpmbuild(macros) >= 1.453
+Requires: browser-plugins >= 2.0
+Requires: nspr
+Requires: nss
+Requires: xdg-utils
+Provides: wwwbrowser
+ExclusiveArch: %{ix86} %{x8664}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define find_lang sh find-lang.sh %{buildroot}
+
+%define _enable_debug_packages 0
+%define no_install_post_strip 1
+
+%define nss_caps libfreebl3.so libnss3.so libnssckbi.so libsmime3.so ibsoftokn3.so libssl3.so libnssutil3.so
+%define nspr_caps libnspr4.so libplc4.so libplds4.so
+%define ffmpeg_caps libffmpegsumo.so
+
+# list of script capabilities (regexps) not to be used in Provides
+%define _noautoprov %{nss_caps} %{nspr_caps} %{ffmpeg_caps}
+# do not require them either
+%define _noautoreq %{_noautoprov}
+
+%description
+The web browser from Google
+
+Google Chrome is a browser that combines a minimal design with
+sophisticated technology to make the web faster, safer, and easier.
+
+%prep
+%setup -qcT
+%ifarch %{ix86}
+rpm2cpio %{SOURCE0} | cpio -i -d
+%endif
+%ifarch %{x8664}
+rpm2cpio %{SOURCE1} | cpio -i -d
+%endif
+
+mv opt/google/chrome .
+mv usr/share/man/man1/* .
+mv usr/share/gnome-control-center/default-apps .
+mv chrome/product_logo_*.{png,xpm} .
+mv chrome/google-chrome.desktop .
+mv chrome/google-chrome .
+chmod a+x chrome/lib*.so*
+
+%ifarch %{x8664}
+# go figure, 32bit one doesn't have it compressed
+gzip -d *.1.gz
+%endif
+
+%{__sed} -e 's, at localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
+%{__sed} -i -e 's;/opt/google/chrome;%{_libdir}/%{name};' chrome/default-app-block
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir},%{_libdir}/%{name}/themes}
+
+install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
+%{__sed} -i -e 's, at libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
+cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -a google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+cp -a google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
+
+%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
+
+# nspr symlinks
+for a in libnspr4.so libplc4.so libplds4.so; do
+ ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.0d
+done
+# nss symlinks
+for a in libnss3.so libnssutil3.so libsmime3.so libssl3.so; do
+ ln -s %{_libdir}/$a $RPM_BUILD_ROOT%{_libdir}/%{name}/$a.1d
+done
+
+# find locales
+%find_lang %{name}.lang
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%update_browser_plugins
+
+%postun
+if [ "$1" = 0 ]; then
+ %update_browser_plugins
+fi
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+
+%{_browserpluginsconfdir}/browsers.d/%{name}.*
+%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
+
+%attr(755,root,root) %{_bindir}/%{name}
+%{_mandir}/man1/*.1*
+%{_pixmapsdir}/%{name}.png
+%{_desktopdir}/*.desktop
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/chrome.pak
+%{_libdir}/%{name}/default-app-block
+%dir %{_libdir}/%{name}/locales
+%dir %{_libdir}/%{name}/plugins
+%{_libdir}/%{name}/resources
+%{_libdir}/%{name}/themes
+%attr(755,root,root) %{_libdir}/%{name}/chrome
+# These unique permissions are intentional and necessary for the sandboxing
+%attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
+
+# ffmpeg libs
+%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
+
+# nspr/nss symlinks
+%attr(755,root,root) %{_libdir}/%{name}/libnspr4.so.0d
+%attr(755,root,root) %{_libdir}/%{name}/libplc4.so.0d
+%attr(755,root,root) %{_libdir}/%{name}/libplds4.so.0d
+%attr(755,root,root) %{_libdir}/%{name}/libnss3.so.1d
+%attr(755,root,root) %{_libdir}/%{name}/libnssutil3.so.1d
+%attr(755,root,root) %{_libdir}/%{name}/libsmime3.so.1d
+%attr(755,root,root) %{_libdir}/%{name}/libssl3.so.1d
+
+# bundle this copy until xdg-utils will have this itself
+%attr(755,root,root) %{_libdir}/%{name}/xdg-settings
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2009/12/09 14:48:28 glen
+- google chrome browser v4.0.249.30, based on chromium-browser-bin package
================================================================
More information about the pld-cvs-commit
mailing list