wok annotate get-flash-plugin/stuff/get-flash-plugin @ rev 1173
get-skype, get-google-earth, get-flash-plugin: use 'tazpkg pack'
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 02 09:34:54 2008 +0000 (2008-08-02) |
parents | 510870ca891b |
children | 2499cc726561 |
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@1173 | 32 chmod 755 libflashplayer.so |
pascal@1173 | 33 mv libflashplayer.so /usr/lib/firefox*/plugins |
pascal@305 | 34 |
pascal@305 | 35 # Create pseudo package |
pascal@1173 | 36 while read file; do |
pascal@1173 | 37 dest=flash-plugin-$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@1173 | 41 $(ls /usr/lib/firefox*/plugins/libflashplayer.so) |
pascal@1173 | 42 EOT |
pascal@1173 | 43 cat > flash-plugin-$VERSION/receipt <<EOT |
pascal@305 | 44 PACKAGE="flash-plugin" |
pascal@305 | 45 VERSION="$VERSION" |
pascal@305 | 46 CATEGORY="non-free" |
pascal@305 | 47 SHORT_DESC="Adobe Flash Player." |
pascal@305 | 48 WEB_SITE="$WEB_SITE" |
pascal@305 | 49 EOT |
pascal@1173 | 50 |
pascal@1173 | 51 # Pack |
pascal@1173 | 52 tazpkg pack flash-plugin-$VERSION |
pascal@305 | 53 |
pascal@305 | 54 # Install pseudo package |
pascal@305 | 55 tazpkg install flash-plugin-$VERSION.tazpkg |
pascal@305 | 56 cd .. |
pascal@305 | 57 |
pascal@305 | 58 # Clean |
pascal@305 | 59 rm -rf $DIR $TARBALL |
pascal@305 | 60 |