wok view get-skype/stuff/get-skype @ rev 417

get-skype, get-flash-plugin: check we are root
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 12 19:54:03 2008 +0000 (2008-03-12)
parents 86bae51bfbb0
children ccaed29b8fb1
line source
1 #!/bin/sh -e
3 if test $(id -u) != 0 ; then
4 echo -e "\nYou must be root to run `basename $0`."
5 echo -e "Please type 'su' and root password to become super-user.\n"
6 exit 0
7 fi
9 # Download tarball
10 WEB_SITE="http://www.skype.com/"
11 wget ${WEB_SITE}go/getskype-linux-static
13 # Extract
14 TARBALL=$(ls getskype-linux-static skype*.tar.bz2 2> /dev/null || true)
15 tar xjf $TARBALL
16 VERSION=$(ls -d skype_static-*/)
17 VERSION=${VERSION%/}
18 VERSION=${VERSION#skype_static-}
19 cd skype_static-$VERSION
21 # Install files
22 mkdir -p /usr/share/skype
23 mv */ LICENSE /usr/share/skype
24 mv skype /usr/bin
25 mv skype.conf /etc
26 mv skype.desktop /usr/share/applications
27 ln /usr/share/skype/icons/*16.png /usr/share/pixmaps/skype.png
29 # Create pseudo package
30 mkdir -p fs/usr/share/skype
31 mv README fs/usr/share/skype
32 find fs | cpio -o -H newc | gzip -9 > fs.cpio.gz
33 cat > files.list <<EOT
34 /usr/bin/skype
35 /etc/skype.conf
36 /usr/share/applications/skype.desktop
37 $(find /usr/share/skype)
38 /usr/share/skype/README
39 EOT
40 cat > receipt <<EOT
41 PACKAGE="skype"
42 VERSION="$VERSION"
43 CATEGORY="non-free"
44 SHORT_DESC="Skype Internet Telephony."
45 WEB_SITE="$WEB_SITE"
46 DEPENDS="libsigc++"
47 EOT
48 cpio -o -H newc > skype-$VERSION.tazpkg <<EOT
49 receipt
50 files.list
51 fs.cpio.gz
52 EOT
54 # Install pseudo package
55 tazpkg install skype-$VERSION.tazpkg
56 cd ..
58 # Clean
59 rm -rf skype_static-$VERSION* $TARBALL