wok-6.x view get-google-talkplugin/stuff/get-google-talkplugin @ rev 12953
zerobin: append '=' to forced key
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 31 13:45:40 2012 +0200 (2012-05-31) |
parents | |
children | 351e5fac42ac |
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/usr/share/$PACKAGE
46 mv x/opt/google/talkplugin/* $PACKAGE-$VERSION/usr/share/$PACKAGE
47 mv $PACKAGE-$VERSION/usr/share/$PACKAGE/lib $PACKAGE-$VERSION/usr
49 # No auto updates...
50 rm -rf $PACKAGE-$VERSION/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 chroot $1/ ln -s /usr/share/$PACKAGE/*.so /usr/lib/firefox*/plugins
63 }
65 post_remove()
66 {
67 for i in /usr/lib/firefox*/plugins/*.so ; do
68 case "$(readlink $i)" in
69 /usr/share/$PACKAGE/*) rm -f $i ;;
70 esac
71 done
72 }
73 EOT
75 # Pack
76 tazpkg pack $PACKAGE-$VERSION
78 # Clean to save RAM memory
79 rm -rf $PACKAGE-$VERSION
81 # Install pseudo package
82 tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
84 # Clean
85 cd $CUR_DIR
86 rm -rf $TMP_DIR