wok-6.x rev 5080
Updated get-google-chrome: receipt for the google-chrome.desktop and icons setting.
author | Liu Peng <rocky@slitaz.org> |
---|---|
date | Mon Mar 15 01:05:51 2010 +0000 (2010-03-15) |
parents | 9b4cbd2f3b0e |
children | 2844c9a2b253 |
files | get-google-chrome/receipt get-google-chrome/stuff/get-google-chrome |
line diff
1.1 --- a/get-google-chrome/receipt Sat Mar 13 21:40:45 2010 +0100 1.2 +++ b/get-google-chrome/receipt Mon Mar 15 01:05:51 2010 +0000 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="get-google-chrome" 1.7 -VERSION="1.00" 1.8 +VERSION="1.01" 1.9 CATEGORY="non-free" 1.10 SHORT_DESC="Google Chrome is built with open source code from Chromium." 1.11 MAINTAINER="rocky@slitaz.org"
2.1 --- a/get-google-chrome/stuff/get-google-chrome Sat Mar 13 21:40:45 2010 +0100 2.2 +++ b/get-google-chrome/stuff/get-google-chrome Mon Mar 15 01:05:51 2010 +0000 2.3 @@ -54,9 +54,6 @@ 2.4 2.5 mkdir -p $PACKAGE-$VERSION/fs 2.6 mv usr opt $PACKAGE-$VERSION/fs 2.7 -mkdir -p $PACKAGE-$VERSION/fs/usr/share/applications/ 2.8 -mv $PACKAGE-$VERSION/fs/opt/google/chrome/google-chrome.desktop \ 2.9 - $PACKAGE-$VERSION/fs/usr/share/applications/ 2.10 2.11 cd $TEMP_DIR 2.12 2.13 @@ -65,7 +62,7 @@ 2.14 VERSION="$VERSION" 2.15 CATEGORY="non-free" 2.16 SHORT_DESC="The web browser from Google." 2.17 -DEPENDS="gtk+ GConf lzma flash-plugin" 2.18 +DEPENDS="gtk+ GConf lzma flash-plugin bash xdg-utils" 2.19 WEB_SITE="http://www.google.com/chrome/" 2.20 2.21 post_install() 2.22 @@ -80,6 +77,30 @@ 2.23 ln -s /usr/lib/libsmime3.so $root/usr/lib/libsmime3.so.1d 2> /dev/null 2.24 ln -s /usr/lib/libssl3.so $root/usr/lib/libssl3.so.1d 2> /dev/nul 2.25 sed -i 's/exec -a "$0"/exec /' $root/usr/bin/google-chrome 2> /dev/null 2.26 + 2.27 + # Add icons to the system icons 2.28 + XDG_ICON_RESOURCE="\`which xdg-icon-resource 2> /dev/null\`" 2.29 + if [ ! -x "\$XDG_ICON_RESOURCE" ]; then 2.30 + echo "Error: Could not find xdg-icon-resource" >&2 2.31 + return 1 2.32 + fi 2.33 + for icon in "/opt/google/chrome/product_logo_"*.png; do 2.34 + size="\${icon##*/product_logo_}" 2.35 + "\$XDG_ICON_RESOURCE" install --size "\${size%.png}" "\$icon" "google-chrome" 2.36 + done 2.37 + 2.38 + # Add an entry to the system menu 2.39 + XDG_DESKTOP_MENU="\`which xdg-desktop-menu 2> /dev/null\`" 2.40 + UPDATE_MENUS="\`which update-menus 2> /dev/null\`" 2.41 + if [ ! -x "\$XDG_DESKTOP_MENU" ]; then 2.42 + echo "Error: Could not find xdg-desktop-menu" >&2 2.43 + return 1 2.44 + fi 2.45 + "\$XDG_DESKTOP_MENU" install /opt/google/chrome/google-chrome.desktop 2.46 + 2.47 + if [ -x "\$UPDATE_MENUS" ]; then 2.48 + update-menus 2.49 + fi 2.50 } 2.51 pre_remove() 2.52 { 2.53 @@ -90,6 +111,30 @@ 2.54 /usr/lib/libplds4.so.0d \ 2.55 /usr/lib/libsmime3.so.1d \ 2.56 /usr/lib/libssl3.so.1d 2> /dev/nul 2.57 + 2.58 + # Remove icons from the system icons 2.59 + XDG_ICON_RESOURCE="\`which xdg-icon-resource 2> /dev/null\`" 2.60 + if [ ! -x "\$XDG_ICON_RESOURCE" ]; then 2.61 + echo "Error: Could not find xdg-icon-resource" >&2 2.62 + return 1 2.63 + fi 2.64 + for icon in "/opt/google/chrome/product_logo_"*.png; do 2.65 + size="\${icon##*/product_logo_}" 2.66 + "\$XDG_ICON_RESOURCE" uninstall --size "\${size%.png}" "google-chrome" 2.67 + done 2.68 + 2.69 + # Remove the entry from the system menu 2.70 + XDG_DESKTOP_MENU="\`which xdg-desktop-menu 2> /dev/null\`" 2.71 + UPDATE_MENUS="\`which update-menus 2> /dev/null\`" 2.72 + if [ ! -x "\$XDG_DESKTOP_MENU" ]; then 2.73 + echo "Error: Could not find xdg-desktop-menu" >&2 2.74 + return 1 2.75 + fi 2.76 + "\$XDG_DESKTOP_MENU" uninstall /opt/google/chrome/google-chrome.desktop 2.77 + 2.78 + if [ -x "\$UPDATE_MENUS" ]; then 2.79 + update-menus 2.80 + fi 2.81 } 2.82 EOT 2.83