wok annotate get-flash-plugin/stuff/get-flash-plugin @ rev 446
Get-skype, get-flash-plugin: allow reinstall
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 16 18:55:45 2008 +0100 (2008-03-16) |
parents | c05ff7572e16 |
children | 49490d76a557 |
rev | line source |
---|---|
pascal@305 | 1 #!/bin/sh -e |
pascal@305 | 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/flash-plugin ]; then |
pascal@446 | 10 tazpkg remove flash-plugin |
pascal@446 | 11 [ -d /var/lib/tazpkg/installed/flash-plugin ] && exit 1 |
pascal@446 | 12 fi |
pascal@305 | 13 DIR=install_flash_player_9_linux |
pascal@305 | 14 TARBALL=$DIR.tar.gz |
pascal@305 | 15 WEB_SITE="http://www.adobe.com/products/flash/" |
pascal@305 | 16 |
pascal@305 | 17 # Download tarball |
pascal@305 | 18 wget http://fpdownload.macromedia.com/get/flashplayer/current/$TARBALL |
pascal@305 | 19 |
pascal@305 | 20 # Extract |
pascal@305 | 21 tar xzf $TARBALL |
pascal@305 | 22 |
pascal@305 | 23 cd $DIR |
pascal@305 | 24 VERSION="" |
pascal@305 | 25 for i in MAJ MIN REV ; do |
pascal@305 | 26 n=$(grep ^FPVERSION$i flashplayer-installer | cut -d= -f2) |
pascal@305 | 27 [ -n "$VERSION" ] && VERSION=$VERSION. |
pascal@305 | 28 VERSION=$VERSION$n |
pascal@305 | 29 done |
pascal@305 | 30 |
pascal@305 | 31 # Install files |
pascal@305 | 32 cp libflashplayer.so /usr/lib/firefox*/plugins |
pascal@305 | 33 chmod 755 /usr/lib/firefox*/plugins/libflashplayer.so |
pascal@305 | 34 |
pascal@305 | 35 # Create pseudo package |
pascal@305 | 36 mkdir -p fs/usr/bin |
pascal@305 | 37 cp /usr/bin/get-flash-plugin fs/usr/bin |
pascal@305 | 38 find fs | cpio -o -H newc | gzip -9 > fs.cpio.gz |
pascal@305 | 39 ls /usr/lib/firefox*/plugins/libflashplayer.so > files.list |
pascal@305 | 40 cat > receipt <<EOT |
pascal@305 | 41 PACKAGE="flash-plugin" |
pascal@305 | 42 VERSION="$VERSION" |
pascal@305 | 43 CATEGORY="non-free" |
pascal@305 | 44 SHORT_DESC="Adobe Flash Player." |
pascal@305 | 45 WEB_SITE="$WEB_SITE" |
pascal@305 | 46 EOT |
pascal@305 | 47 cpio -o -H newc > flash-plugin-$VERSION.tazpkg <<EOT |
pascal@305 | 48 receipt |
pascal@305 | 49 files.list |
pascal@305 | 50 fs.cpio.gz |
pascal@305 | 51 EOT |
pascal@305 | 52 |
pascal@305 | 53 # Install pseudo package |
pascal@305 | 54 tazpkg install flash-plugin-$VERSION.tazpkg |
pascal@305 | 55 cd .. |
pascal@305 | 56 |
pascal@305 | 57 # Clean |
pascal@305 | 58 rm -rf $DIR $TARBALL |
pascal@305 | 59 |