wok annotate get-skype/stuff/get-skype @ rev 1174
get-skype: declare config file
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 02 09:56:46 2008 +0000 (2008-08-02) |
parents | 49490d76a557 |
children | e01dd228942a |
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@446 | 9 if [ -d /var/lib/tazpkg/installed/skype ]; then |
pascal@446 | 10 tazpkg remove skype |
pascal@446 | 11 [ -d /var/lib/tazpkg/installed/skype ] && exit 1 |
pascal@446 | 12 fi |
pascal@446 | 13 [ -d /usr/share/skype ] && rm -rf /usr/share/skype |
pascal@446 | 14 |
pascal@300 | 15 # Download tarball |
pascal@300 | 16 WEB_SITE="http://www.skype.com/" |
pascal@300 | 17 wget ${WEB_SITE}go/getskype-linux-static |
pascal@300 | 18 |
pascal@300 | 19 # Extract |
pascal@300 | 20 TARBALL=$(ls getskype-linux-static skype*.tar.bz2 2> /dev/null || true) |
pascal@300 | 21 tar xjf $TARBALL |
pascal@300 | 22 VERSION=$(ls -d skype_static-*/) |
pascal@300 | 23 VERSION=${VERSION%/} |
pascal@300 | 24 VERSION=${VERSION#skype_static-} |
pascal@300 | 25 cd skype_static-$VERSION |
pascal@300 | 26 |
pascal@300 | 27 # Install files |
pascal@300 | 28 mkdir -p /usr/share/skype |
pascal@446 | 29 mv */ LICENSE README /usr/share/skype |
pascal@300 | 30 mv skype /usr/bin |
pascal@300 | 31 mv skype.conf /etc |
pascal@300 | 32 mv skype.desktop /usr/share/applications |
pascal@417 | 33 ln /usr/share/skype/icons/*16.png /usr/share/pixmaps/skype.png |
pascal@300 | 34 |
pascal@300 | 35 # Create pseudo package |
pascal@1173 | 36 while read file; do |
pascal@1173 | 37 dest=skype-$VERSION/fs$(dirname $file) |
pascal@1173 | 38 [ -d $dest ] || mkdir -p $dest |
pascal@1173 | 39 cp -a $file $dest |
pascal@1173 | 40 done <<EOT |
pascal@300 | 41 /usr/bin/skype |
pascal@300 | 42 /etc/skype.conf |
pascal@300 | 43 /usr/share/applications/skype.desktop |
pascal@419 | 44 /usr/share/pixmaps/skype.png |
pascal@1173 | 45 /usr/share/skype |
pascal@300 | 46 EOT |
pascal@1173 | 47 cat > skype-$VERSION/receipt <<EOT |
pascal@300 | 48 PACKAGE="skype" |
pascal@300 | 49 VERSION="$VERSION" |
pascal@300 | 50 CATEGORY="non-free" |
pascal@300 | 51 SHORT_DESC="Skype Internet Telephony." |
pascal@300 | 52 WEB_SITE="$WEB_SITE" |
pascal@436 | 53 DEPENDS="libsigc++ xorg-libXv xorg-libXss" |
pascal@1174 | 54 CONFIG_FILES="/etc/skype.conf" |
pascal@300 | 55 EOT |
pascal@1173 | 56 |
pascal@1173 | 57 # Pack |
pascal@1173 | 58 tazpkg pack skype-$VERSION |
pascal@300 | 59 |
pascal@300 | 60 # Install pseudo package |
pascal@300 | 61 tazpkg install skype-$VERSION.tazpkg |
pascal@300 | 62 cd .. |
pascal@300 | 63 |
pascal@300 | 64 # Clean |
pascal@300 | 65 rm -rf skype_static-$VERSION* $TARBALL |