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