wok view get-skype/stuff/get-skype @ rev 3939
emacs 23.1: small adjustments
author | Dominique Corbex <domcox@users.sourceforge.net> |
---|---|
date | Sat Aug 22 11:15:56 2009 +0200 (2009-08-22) |
parents | 79b993d2d81e |
children | 2da8547f534b |
line source
1 #!/bin/sh -e
3 ROOT="$1"
5 if test $(id -u) != 0 ; then
6 echo -e "\nYou must be root to run `basename $0`."
7 echo -e "Please type 'su' and root password to become super-user.\n"
8 exit 0
9 fi
11 if [ -d $ROOT/var/lib/tazpkg/installed/skype ]; then
12 [ -n "$ROOT" ] && exit 1
13 tazpkg remove skype
14 [ -d /var/lib/tazpkg/installed/skype ] && exit 1
15 fi
16 [ -d $ROOT/usr/share/skype ] && rm -rf $ROOT/usr/share/skype
18 # Download tarball
19 WEB_SITE="http://www.skype.com/"
20 TARBALL="getskype-linux-static"
21 wget ${WEB_SITE}go/$TARBALL
22 if [ ! -f $TARBALL ]; then
23 echo "Could not download $TARBALL. Exiting."
24 exit 1
25 fi
27 # Extract
28 TARBALL=$(ls $TARBALL skype*.tar.bz2 2> /dev/null || true)
29 tar xjf $TARBALL
30 VERSION=$(ls -d skype_static-*/)
31 VERSION=${VERSION%/}
32 VERSION=${VERSION#skype_static-}
33 cd skype_static-$VERSION
35 # Install files
36 mkdir -p skype-$VERSION/fs/usr/share/skype skype-$VERSION/fs/usr/bin
37 mkdir -p skype-$VERSION/fs/etc skype-$VERSION/fs/usr/share/applications
38 mkdir -p skype-$VERSION/fs/usr/share/pixmaps
39 mkdir -p skype-$VERSION/fs/usr/share/skype
40 mv LICENSE README skype-$VERSION/fs/usr/share/skype
41 mv skype skype-$VERSION/fs/usr/bin
42 mv icons skype-$VERSION/fs/usr/share/skype
43 mv avatars skype-$VERSION/fs/usr/share/skype
44 mv sounds skype-$VERSION/fs/usr/share/skype
45 mv skype.conf skype-$VERSION/fs/etc
46 mv skype.desktop skype-$VERSION/fs/usr/share/applications
47 cd skype-$VERSION/fs/usr/share/pixmaps/
48 ln -s ../skype/icons/SkypeBlue_16x16.png skype.png ; cd -
51 # Create pseudo package
52 cat > skype-$VERSION/receipt <<EOT
53 PACKAGE="skype"
54 VERSION="$VERSION"
55 CATEGORY="non-free"
56 SHORT_DESC="Skype Internet Telephony."
57 WEB_SITE="$WEB_SITE"
58 DEPENDS="libsigc++ xorg-libXv xorg-libXss"
59 CONFIG_FILES="/etc/skype.conf"
60 EOT
62 # Pack
63 tazpkg pack skype-$VERSION
65 # Install pseudo package
66 tazpkg install skype-$VERSION.tazpkg --root=$ROOT
67 cd ..
69 # Clean
70 rm -rf skype_static-$VERSION* $TARBALL