wok-current rev 19336
Remove get-google-chrome: 32bit is discontinued
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Sun Jul 17 21:37:21 2016 -0400 (2016-07-17) |
parents | bec98053d476 |
children | 7d58830b2493 |
files | get-google-chrome/receipt get-google-chrome/stuff/get-google-chrome |
line diff
1.1 --- a/get-google-chrome/receipt Sun Jul 17 20:47:30 2016 -0400 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,20 +0,0 @@ 1.4 -# SliTaz package receipt. 1.5 - 1.6 -PACKAGE="get-google-chrome" 1.7 -VERSION="1.03" 1.8 -CATEGORY="non-free" 1.9 -SHORT_DESC="Google Chrome is built with open source code from Chromium." 1.10 -MAINTAINER="rocky@slitaz.org" 1.11 -LICENSE="BSD" 1.12 -WEB_SITE="http://code.google.com/chromium/" 1.13 -TAGS="browser" 1.14 - 1.15 -DEPENDS="wget nss" 1.16 - 1.17 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.18 -genpkg_rules() 1.19 -{ 1.20 - mkdir -p $fs/usr/bin 1.21 - cp stuff/get-google-chrome $fs/usr/bin 1.22 -} 1.23 -
2.1 --- a/get-google-chrome/stuff/get-google-chrome Sun Jul 17 20:47:30 2016 -0400 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,151 +0,0 @@ 2.4 -#!/bin/sh 2.5 -# Google Chrome is built with open source code from Chromium. 2.6 - 2.7 -PACKAGE="google-chrome-unstable" 2.8 -DEBPKG="${PACKAGE}_current_i386.deb" 2.9 -URL="https://dl.google.com/linux/direct/$DEBPKG" 2.10 -CUR_DIR=$(pwd) 2.11 -TEMP_DIR=/tmp/$PACKAGE-$$ 2.12 -ROOT= 2.13 -FORCED= 2.14 - 2.15 -while getopts "hfr:" option; do 2.16 - case $option in 2.17 - h) echo -e "Usage: $(basename $0) [-f|-r path]\n -f: force install.\n -r path: root directory."; exit 1 ;; 2.18 - f) FORCED="--forced" ;; 2.19 - r) ROOT=$OPTARG ;; 2.20 - \?) echo "Wrong argument, Exit ...."; exit 1 ;; 2.21 - esac 2.22 -done 2.23 - 2.24 -# Check if we are root 2.25 -if test $(id -u) != 0 ; then 2.26 - echo -e "\nYou must be root to run `basename $0`." 2.27 - echo -e "Please type 'su' and root password to become super-user.\n" 2.28 - exit 1 2.29 -fi 2.30 - 2.31 -# Avoid reinstall 2.32 -if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ] && [ -z $FORCED ]; then 2.33 - echo -e "\n$PACKAGE package is already installed, add '-f' option to force install.\n" 2.34 - exit 1 2.35 -fi 2.36 - 2.37 -# Create a TEMP_DIR 2.38 -mkdir $TEMP_DIR 2.39 -cd $TEMP_DIR 2.40 - 2.41 -# Download the file 2.42 -wget --no-check-certificate $URL 2.43 -if [ ! -f $DEBPKG ]; then 2.44 - cd $CUR_DIR 2.45 - rm -rf $TEMP_DIR 2.46 - echo "Could not download $DEBPKG. Exiting." 2.47 - exit 1 2.48 -fi 2.49 - 2.50 -dpkg-deb -e $DEBPKG . 2.51 -VERSION=`sed -n 's/Version:\ *//p' control` 2.52 - 2.53 -mkdir $PACKAGE-$VERSION 2.54 - 2.55 -dpkg-deb -x $DEBPKG $PACKAGE-$VERSION/fs 2.56 -rm -rf $PACKAGE-$VERSION/fs/usr/share 2.57 -rm -rf $PACKAGE-$VERSION/fs/etc 2.58 - 2.59 -# extracted pkg can be removed: Save RAM 2.60 -rm -rf $DEBPKG 2.61 - 2.62 -cat > $PACKAGE-$VERSION/receipt << EOT 2.63 -PACKAGE="$PACKAGE" 2.64 -VERSION="$VERSION" 2.65 -CATEGORY="non-free" 2.66 -SHORT_DESC="The web browser from Google." 2.67 -DEPENDS="gtk+ GConf lzma bash xdg-utils xorg-libXss libcups libjpeg62" 2.68 -WEB_SITE="http://www.google.com/chrome/" 2.69 - 2.70 -post_install() 2.71 -{ 2.72 - local root 2.73 - root=$1 2.74 - ln -s /usr/lib/libnspr4.so $root/usr/lib/libnspr4.so.0d 2> /dev/null 2.75 - ln -s /usr/lib/libnss3.so $root/usr/lib/libnss3.so.1d 2> /dev/null 2.76 - ln -s /usr/lib/libnssutil3.so $root/usr/lib/libnssutil3.so.1d 2> /dev/null 2.77 - ln -s /usr/lib/libplc4.so $root/usr/lib/libplc4.so.0d 2> /dev/null 2.78 - ln -s /usr/lib/libplds4.so $root/usr/lib/libplds4.so.0d 2> /dev/null 2.79 - ln -s /usr/lib/libsmime3.so $root/usr/lib/libsmime3.so.1d 2> /dev/null 2.80 - ln -s /usr/lib/libssl3.so $root/usr/lib/libssl3.so.1d 2> /dev/nul 2.81 - sed -i 's/exec -a "$0"/exec /' $root/usr/bin/google-chrome 2> /dev/null 2.82 - 2.83 - # Add icons to the system icons 2.84 - XDG_ICON_RESOURCE="\`which xdg-icon-resource 2> /dev/null\`" 2.85 - if [ ! -x "\$XDG_ICON_RESOURCE" ]; then 2.86 - echo "Error: Could not find xdg-icon-resource" >&2 2.87 - return 1 2.88 - fi 2.89 - for icon in "/opt/google/chrome/product_logo_"*.png; do 2.90 - size="\${icon##*/product_logo_}" 2.91 - "\$XDG_ICON_RESOURCE" install --size "\${size%.png}" "\$icon" "google-chrome" 2.92 - done 2.93 - 2.94 - # Add an entry to the system menu 2.95 - XDG_DESKTOP_MENU="\`which xdg-desktop-menu 2> /dev/null\`" 2.96 - UPDATE_MENUS="\`which update-menus 2> /dev/null\`" 2.97 - if [ ! -x "\$XDG_DESKTOP_MENU" ]; then 2.98 - echo "Error: Could not find xdg-desktop-menu" >&2 2.99 - return 1 2.100 - fi 2.101 - "\$XDG_DESKTOP_MENU" install /opt/google/chrome/google-chrome.desktop 2.102 - 2.103 - if [ -x "\$UPDATE_MENUS" ]; then 2.104 - update-menus 2.105 - fi 2.106 -} 2.107 -pre_remove() 2.108 -{ 2.109 - rm -f /usr/lib/libnspr4.so.0d \ 2.110 - /usr/lib/libnss3.so.1d \ 2.111 - /usr/lib/libnssutil3.so.1d \ 2.112 - /usr/lib/libplc4.so.0d \ 2.113 - /usr/lib/libplds4.so.0d \ 2.114 - /usr/lib/libsmime3.so.1d \ 2.115 - /usr/lib/libssl3.so.1d 2> /dev/nul 2.116 - 2.117 - # Remove icons from the system icons 2.118 - XDG_ICON_RESOURCE="\`which xdg-icon-resource 2> /dev/null\`" 2.119 - if [ ! -x "\$XDG_ICON_RESOURCE" ]; then 2.120 - echo "Error: Could not find xdg-icon-resource" >&2 2.121 - return 1 2.122 - fi 2.123 - for icon in "/opt/google/chrome/product_logo_"*.png; do 2.124 - size="\${icon##*/product_logo_}" 2.125 - "\$XDG_ICON_RESOURCE" uninstall --size "\${size%.png}" "google-chrome" 2.126 - done 2.127 - 2.128 - # Remove the entry from the system menu 2.129 - XDG_DESKTOP_MENU="\`which xdg-desktop-menu 2> /dev/null\`" 2.130 - UPDATE_MENUS="\`which update-menus 2> /dev/null\`" 2.131 - if [ ! -x "\$XDG_DESKTOP_MENU" ]; then 2.132 - echo "Error: Could not find xdg-desktop-menu" >&2 2.133 - return 1 2.134 - fi 2.135 - "\$XDG_DESKTOP_MENU" uninstall /opt/google/chrome/google-chrome.desktop 2.136 - 2.137 - if [ -x "\$UPDATE_MENUS" ]; then 2.138 - update-menus 2.139 - fi 2.140 -} 2.141 -EOT 2.142 - 2.143 -# Pack 2.144 -tazpkg pack $PACKAGE-$VERSION 2.145 - 2.146 -# Clean to save RAM memory 2.147 -rm -rf $PACKAGE-$VERSION 2.148 - 2.149 -# Install pseudo package 2.150 -yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT $FORCED 2.151 - 2.152 -# Clean 2.153 -cd $CUR_DIR 2.154 -rm -rf $TEMP_DIR