wok annotate get-skype/stuff/get-skype @ rev 419

get-skype: declare /usr/share/pixmaps/skype.png
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 12 21:32:51 2008 +0000 (2008-03-12)
parents c05ff7572e16
children e64526022ed7
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@419 37 /usr/share/pixmaps/skype.png
pascal@300 38 $(find /usr/share/skype)
pascal@300 39 /usr/share/skype/README
pascal@300 40 EOT
pascal@300 41 cat > receipt <<EOT
pascal@300 42 PACKAGE="skype"
pascal@300 43 VERSION="$VERSION"
pascal@300 44 CATEGORY="non-free"
pascal@300 45 SHORT_DESC="Skype Internet Telephony."
pascal@300 46 WEB_SITE="$WEB_SITE"
pascal@300 47 DEPENDS="libsigc++"
pascal@300 48 EOT
pascal@300 49 cpio -o -H newc > skype-$VERSION.tazpkg <<EOT
pascal@300 50 receipt
pascal@300 51 files.list
pascal@300 52 fs.cpio.gz
pascal@300 53 EOT
pascal@300 54
pascal@300 55 # Install pseudo package
pascal@300 56 tazpkg install skype-$VERSION.tazpkg
pascal@300 57 cd ..
pascal@300 58
pascal@300 59 # Clean
pascal@300 60 rm -rf skype_static-$VERSION* $TARBALL