wok view get-skype/stuff/get-skype @ rev 10145
Add activerecord.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 20 17:52:38 2011 +0000 (2011-05-20) |
parents | 596332a90ae8 |
children | 1acec5b0224d |
line source
1 #!/bin/sh -e
3 ROOT="$1"
4 PACKAGE="skype"
6 if test $(id -u) != 0 ; then
7 echo -e "\nYou must be root to run `basename $0`."
8 echo -e "Please type 'su' and root password to become super-user.\n"
9 exit 0
10 fi
12 if [ -d $ROOT/var/lib/tazpkg/installed/skype ]; then
13 [ -n "$ROOT" ] && exit 1
14 tazpkg remove skype
15 [ -d /var/lib/tazpkg/installed/skype ] && exit 1
16 fi
17 [ -d $ROOT/usr/share/skype ] && rm -rf $ROOT/usr/share/skype
19 TMP_DIR=/tmp/$PACKAGE-$$
20 CUR_DIR=$(pwd)
21 mkdir -p $TMP_DIR && cd $TMP_DIR
23 # Download tarball
24 WEB_SITE="http://www.skype.com/"
25 TARBALL="getskype-linux-beta-static"
26 wget ${WEB_SITE}go/$TARBALL
27 if [ ! -f $TARBALL ]; then
28 echo "Could not download $TARBALL. Exiting."
29 exit 1
30 fi
32 # Extract
33 TARBALL=$(ls $TARBALL skype*.tar.bz2 2> /dev/null || true)
34 tar xjf $TARBALL
35 VERSION=$(ls -d skype_static-*/)
36 VERSION=${VERSION%/}
37 VERSION=${VERSION#skype_static-}
39 # extracted pkg can be removed: Save RAM
40 rm -f $TARBALL
42 cd skype_static-$VERSION
44 # Install files
45 mkdir -p skype-$VERSION/fs/usr/share/skype skype-$VERSION/fs/usr/bin
46 mkdir -p skype-$VERSION/fs/etc skype-$VERSION/fs/usr/share/applications
47 mkdir -p skype-$VERSION/fs/usr/share/pixmaps
48 mkdir -p skype-$VERSION/fs/usr/share/skype
49 mv LICENSE README skype-$VERSION/fs/usr/share/skype
50 mv skype skype-$VERSION/fs/usr/bin
51 mv icons skype-$VERSION/fs/usr/share/skype
52 mv avatars skype-$VERSION/fs/usr/share/skype
53 mv sounds skype-$VERSION/fs/usr/share/skype
54 mv skype.conf skype-$VERSION/fs/etc
55 mv skype.desktop skype-$VERSION/fs/usr/share/applications
56 cd skype-$VERSION/fs/usr/share/pixmaps/
57 ln -s ../skype/icons/SkypeBlue_16x16.png skype.png ; cd -
60 # Create pseudo package
61 cat > skype-$VERSION/receipt <<EOT
62 PACKAGE="skype"
63 VERSION="$VERSION"
64 CATEGORY="non-free"
65 SHORT_DESC="Skype Internet Telephony."
66 WEB_SITE="$WEB_SITE"
67 DEPENDS="libsigc++ xorg-libXv xorg-libXss libv4l bzip2"
68 CONFIG_FILES="/etc/skype.conf"
69 EOT
71 # Pack
72 tazpkg pack skype-$VERSION
74 # Clean to save RAM memory
75 rm -rf $PACKAGE-$VERSION
77 # Install pseudo package
78 tazpkg install skype-$VERSION.tazpkg --root=$ROOT
80 # Clean
81 cd $CUR_DIR
82 rm -rf $TMP_DIR