wok annotate get-flash-plugin/stuff/get-flash-plugin @ 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 c5d8d030881f
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@1174 33 chown root.root libflashplayer.so
pascal@1173 34 mv libflashplayer.so /usr/lib/firefox*/plugins
pascal@305 35
pascal@305 36 # Create pseudo package
pascal@1173 37 while read file; do
pascal@1173 38 dest=flash-plugin-$VERSION/fs$(dirname $file)
pascal@1173 39 [ -d $dest ] || mkdir -p $dest
pascal@1173 40 cp -a $file $dest
pascal@1173 41 done <<EOT
pascal@1173 42 $(ls /usr/lib/firefox*/plugins/libflashplayer.so)
pascal@1173 43 EOT
pascal@1173 44 cat > flash-plugin-$VERSION/receipt <<EOT
pascal@305 45 PACKAGE="flash-plugin"
pascal@305 46 VERSION="$VERSION"
pascal@305 47 CATEGORY="non-free"
pascal@305 48 SHORT_DESC="Adobe Flash Player."
pascal@305 49 WEB_SITE="$WEB_SITE"
pascal@305 50 EOT
pascal@1173 51
pascal@1173 52 # Pack
pascal@1173 53 tazpkg pack flash-plugin-$VERSION
pascal@305 54
pascal@305 55 # Install pseudo package
pascal@305 56 tazpkg install flash-plugin-$VERSION.tazpkg
pascal@305 57 cd ..
pascal@305 58
pascal@305 59 # Clean
pascal@305 60 rm -rf $DIR $TARBALL
pascal@305 61