wok view 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
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 cp libflashplayer.so /usr/lib/firefox*/plugins
33 chmod 755 /usr/lib/firefox*/plugins/libflashplayer.so
35 # Create pseudo package
36 mkdir -p fs/usr/bin
37 cp /usr/bin/get-flash-plugin fs/usr/bin
38 find fs | cpio -o -H newc | gzip -9 > fs.cpio.gz
39 ls /usr/lib/firefox*/plugins/libflashplayer.so > files.list
40 cat > receipt <<EOT
41 PACKAGE="flash-plugin"
42 VERSION="$VERSION"
43 CATEGORY="non-free"
44 SHORT_DESC="Adobe Flash Player."
45 WEB_SITE="$WEB_SITE"
46 EOT
47 cpio -o -H newc > flash-plugin-$VERSION.tazpkg <<EOT
48 receipt
49 files.list
50 fs.cpio.gz
51 EOT
53 # Install pseudo package
54 tazpkg install flash-plugin-$VERSION.tazpkg
55 cd ..
57 # Clean
58 rm -rf $DIR $TARBALL