wok view 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
line source
1 #!/bin/sh -e
3 if test $(id -u) != 0 ; then
4 echo -e "\nYou must be root to run `basename $0`."
5 echo -e "Please type 'su' and root password to become super-user.\n"
6 exit 0
7 fi
9 if [ -d /var/lib/tazpkg/installed/flash-plugin ]; then
10 tazpkg remove flash-plugin
11 [ -d /var/lib/tazpkg/installed/flash-plugin ] && exit 1
12 fi
13 DIR=install_flash_player_9_linux
14 TARBALL=$DIR.tar.gz
15 WEB_SITE="http://www.adobe.com/products/flash/"
17 # Download tarball
18 wget http://fpdownload.macromedia.com/get/flashplayer/current/$TARBALL
20 # Extract
21 tar xzf $TARBALL
23 cd $DIR
24 VERSION=""
25 for i in MAJ MIN REV ; do
26 n=$(grep ^FPVERSION$i flashplayer-installer | cut -d= -f2)
27 [ -n "$VERSION" ] && VERSION=$VERSION.
28 VERSION=$VERSION$n
29 done
31 # Install files
32 chmod 755 libflashplayer.so
33 chown root.root libflashplayer.so
34 mv libflashplayer.so /usr/lib/firefox*/plugins
36 # Create pseudo package
37 while read file; do
38 dest=flash-plugin-$VERSION/fs$(dirname $file)
39 [ -d $dest ] || mkdir -p $dest
40 cp -a $file $dest
41 done <<EOT
42 $(ls /usr/lib/firefox*/plugins/libflashplayer.so)
43 EOT
44 cat > flash-plugin-$VERSION/receipt <<EOT
45 PACKAGE="flash-plugin"
46 VERSION="$VERSION"
47 CATEGORY="non-free"
48 SHORT_DESC="Adobe Flash Player."
49 WEB_SITE="$WEB_SITE"
50 EOT
52 # Pack
53 tazpkg pack flash-plugin-$VERSION
55 # Install pseudo package
56 tazpkg install flash-plugin-$VERSION.tazpkg
57 cd ..
59 # Clean
60 rm -rf $DIR $TARBALL