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