wok-4.x rev 6064
Add get-google-talkplugin
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 22 11:01:15 2010 +0200 (2010-08-22) |
parents | db0522a9fd7a |
children | 63abbfb383f3 |
files | get-google-talkplugin/receipt get-google-talkplugin/stuff/get-google-talkplugin |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-google-talkplugin/receipt Sun Aug 22 11:01:15 2010 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-google-talkplugin" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get Google Talk Plugin." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.google.com/chat/video" 1.12 +TAGS="webcam chat" 1.13 + 1.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.15 +genpkg_rules() 1.16 +{ 1.17 + mkdir -p $fs/usr/bin 1.18 + cp stuff/get-google-talkplugin $fs/usr/bin 1.19 +} 1.20 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-google-talkplugin/stuff/get-google-talkplugin Sun Aug 22 11:01:15 2010 +0200 2.3 @@ -0,0 +1,87 @@ 2.4 +#!/bin/sh -e 2.5 + 2.6 +ROOT="$1" 2.7 +PACKAGE="google-talkplugin" 2.8 +TARBALL="google-talkplugin_current_i386.deb" 2.9 +WGET_URL="http://dl.google.com/linux/direct/$TARBALL" 2.10 +SHORT_DESC="Google Talk Plugin." 2.11 +WEB_SITE="http://www.google.com/chat/video" 2.12 +DEPENDS="firefox gcc-lib-base libssl pango gtk+ atk mesa glew \ 2.13 +xorg-libICE xorg-libSM xorg-libXfixes xorg-libXt xorg-libXcomposite \ 2.14 +xorg-libXext xorg-libXinerama xorg-libXrandr xorg-libXcursor" 2.15 + 2.16 +if test $(id -u) != 0 ; then 2.17 + echo -e "\nYou must be root to run `basename $0`." 2.18 + echo -e "Please type 'su' and root password to become super-user.\n" 2.19 + exit 0 2.20 +fi 2.21 + 2.22 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 2.23 + [ -n "$ROOT" ] && exit 1 2.24 + tazpkg remove $PACKAGE 2.25 + [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 2.26 +fi 2.27 + 2.28 +TMP_DIR=/tmp/$(basename $0)-$$-$RANDOM 2.29 +CUR_DIR=$(pwd) 2.30 +mkdir -p $TMP_DIR && cd $TMP_DIR 2.31 + 2.32 +# Download tarball 2.33 +wget $WGET_URL 2.34 +if [ ! -f $TARBALL ]; then 2.35 + cd $CUR_DIR 2.36 + rm -rf $TMP_DIR 2.37 + echo "Could not download $TARBALL. Exiting." 2.38 + exit 1 2.39 +fi 2.40 + 2.41 +# Extract package 2.42 +dpkg-deb -e $TARBALL e 2.43 +dpkg-deb -x $TARBALL x 2.44 + 2.45 +VERSION="$(awk '/Version:/ { print $2 }' < e/control | sed 's/-/./g')" 2.46 + 2.47 +# Create pseudo package 2.48 +mkdir -p $PACKAGE-$VERSION/usr/share/$PACKAGE 2.49 +mv x/opt/google/talkplugin/* $PACKAGE-$VERSION/usr/share/$PACKAGE 2.50 +mv $PACKAGE-$VERSION/usr/share/$PACKAGE/lib $PACKAGE-$VERSION/usr 2.51 + 2.52 +# No auto updates... 2.53 +rm -rf $PACKAGE-$VERSION/usr/share/$PACKAGE/cron 2.54 + 2.55 +cat > $PACKAGE-$VERSION/receipt <<EOT 2.56 +PACKAGE="$PACKAGE" 2.57 +VERSION="$VERSION" 2.58 +CATEGORY="non-free" 2.59 +SHORT_DESC="$SHORT_DESC" 2.60 +WEB_SITE="$WEB_SITE" 2.61 +DEPENDS="$DEPENDS" 2.62 + 2.63 +post_install() 2.64 +{ 2.65 + chroot $1/ ln -s /usr/share/$PACKAGE/*.so /usr/lib/firefox*/plugins 2.66 +} 2.67 + 2.68 +post_remove() 2.69 +{ 2.70 + for i in /usr/lib/firefox*/plugins/*.so ; do 2.71 + case "$(readlink $i)" in 2.72 + /usr/share/$PACKAGE/*) rm -f $i ;; 2.73 + esac 2.74 + done 2.75 +} 2.76 +EOT 2.77 + 2.78 +# Pack 2.79 +tazpkg pack $PACKAGE-$VERSION 2.80 + 2.81 +# Clean to save RAM memory 2.82 +rm -rf $PACKAGE-$VERSION 2.83 + 2.84 +# Install pseudo package 2.85 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 2.86 + 2.87 +# Clean 2.88 +cd $CUR_DIR 2.89 +rm -rf $TMP_DIR 2.90 +