wok-6.x view get-google-talkplugin/stuff/get-google-talkplugin @ rev 17559
slim: why force base theme on update
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Thu Feb 05 21:41:45 2015 -0500 (2015-02-05) |
parents | 5e8163d91ee4 |
children |
line source
1 #!/bin/sh -e
3 ROOT="$1"
4 PACKAGE="google-talkplugin"
5 TARBALL="google-talkplugin_current_i386.deb"
6 WGET_URL="http://dl.google.com/linux/direct/$TARBALL"
7 SHORT_DESC="Google Talk Plugin."
8 WEB_SITE="http://www.google.com/chat/video"
9 DEPENDS="firefox gcc-lib-base libssl pango gtk+ atk mesa glew \
10 xorg-libICE xorg-libSM xorg-libXfixes xorg-libXt xorg-libXcomposite \
11 xorg-libXext xorg-libXinerama xorg-libXrandr xorg-libXcursor"
13 if test $(id -u) != 0 ; then
14 echo -e "\nYou must be root to run `basename $0`."
15 echo -e "Please type 'su' and root password to become super-user.\n"
16 exit 0
17 fi
19 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
20 [ -n "$ROOT" ] && exit 1
21 tazpkg remove $PACKAGE
22 [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1
23 fi
25 TMP_DIR=/tmp/$(basename $0)-$$-$RANDOM
26 CUR_DIR=$(pwd)
27 mkdir -p $TMP_DIR && cd $TMP_DIR
29 # Download tarball
30 wget $WGET_URL
31 if [ ! -f $TARBALL ]; then
32 cd $CUR_DIR
33 rm -rf $TMP_DIR
34 echo "Could not download $TARBALL. Exiting."
35 exit 1
36 fi
38 # Extract package
39 dpkg-deb -e $TARBALL e
40 dpkg-deb -x $TARBALL x
42 VERSION="$(awk '/Version:/ { print $2 }' < e/control | sed 's/-/./g')"
44 # Create pseudo package
45 mkdir -p $PACKAGE-$VERSION/fs/usr/share/$PACKAGE
46 mv x/opt/google/talkplugin/* $PACKAGE-$VERSION/fs/usr/share/$PACKAGE
47 mv $PACKAGE-$VERSION/fs/usr/share/$PACKAGE/lib $PACKAGE-$VERSION/fs/usr
49 # No auto updates...
50 rm -rf $PACKAGE-$VERSION/fs/usr/share/$PACKAGE/cron
52 cat > $PACKAGE-$VERSION/receipt <<EOT
53 PACKAGE="$PACKAGE"
54 VERSION="$VERSION"
55 CATEGORY="non-free"
56 SHORT_DESC="$SHORT_DESC"
57 WEB_SITE="$WEB_SITE"
58 DEPENDS="$DEPENDS"
60 post_install()
61 {
62 mkdir -p /usr/lib/firefox/plugins
63 chroot $1/ ln -s /usr/share/$PACKAGE/*.so /usr/lib/firefox/plugins
64 }
66 post_remove()
67 {
68 for i in /usr/lib/firefox*/plugins/*.so ; do
69 case "$(readlink $i)" in
70 /usr/share/$PACKAGE/*) rm -f $i ;;
71 esac
72 done
73 }
74 EOT
77 # Pack
78 tazpkg pack $PACKAGE-$VERSION
80 # Install pseudo package
81 tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
83 # Clean to save RAM memory
84 rm -rf $PACKAGE-$VERSION
85 cd $CUR_DIR
86 rm -rf $TMP_DIR