get-scripts view flash-plugin @ rev 11

add flash-plugin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 15 13:43:05 2014 +0000 (2014-04-15)
parents
children 20bc76d343ad
line source
1 WEB_SITE="http://www.adobe.com/products/flash/"
2 SHORT_DESC="Adobe Flash Player."
3 TARBALL="install_flash_player_11_linux.i386.tar.gz"
5 WGET_URL=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/$TARBALL
6 busybox wget -O $TARBALL $WGET_URL
7 [ -f $TARBALL ] || abort_package "Could not download $TARBALL. Exiting."
8 tar xzf $TARBALL
9 VERSION="$(strings libflashplayer.so | sed '/FlashPlayer_/!d;s/.*yer_\(.*\)_Flash.*/\1/;s/_/./g')"
11 # Install files
12 chmod 755 libflashplayer.so
13 chown root.root libflashplayer.so
14 dir=$PACKAGE-$VERSION/fs
15 mkdir -p $dir/usr/share/flash
16 mv libflashplayer.so $dir/usr/share/flash
17 mv usr/bin $dir/usr
18 mv usr/share/icons $dir/usr/share
19 mv usr/share/pixmaps $dir/usr/share
21 # Sanity Check: Reexport firefox libraries if they don't exist
22 dir=$PACKAGE-$VERSION/fs/usr/lib
23 mkdir -p $dir
24 for i in /usr/lib/firefox/*.so ; do
25 [ -f $i ] && [ -z "`ls /usr/lib/$(basename $i)`" ] && ln -s $i $dir
26 done
28 # Create pseudo package
29 cat > $PACKAGE-$VERSION/receipt <<EOT
30 PACKAGE="$PACKAGE"
31 VERSION="$VERSION"
32 CATEGORY="non-free"
33 SHORT_DESC="$SHORT_DESC"
34 WEB_SITE="$WEB_SITE"
35 DEPENDS="libfirefox curl atk cairo expat fontconfig freetype glib gtk+ libpng \
36 nss pango pixman xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
37 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
38 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXt zlib"
40 post_install()
41 {
42 echo -n "Processing post install commands..."
44 [ -d \$1/usr/lib/mozilla/plugins ] || mkdir -p \$1/usr/lib/mozilla/plugins
45 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/mozilla/plugins
46 [ -d \$1/opt/google/chrome/plugins ] || mkdir -p \$1/opt/google/chrome/plugins
47 ln -s /usr/share/flash/libflashplayer.so \$1/opt/google/chrome/plugins/libgcflashplayer.so
48 [ -d \$1/usr/lib/opera/plugins ] || mkdir -p \$1/usr/lib/opera/plugins
49 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/opera/plugins/libflashplayer.so
50 status
51 }
53 post_remove()
54 {
55 echo -n "Processing post remove commands..."
56 rm -f \$1/usr/lib/mozilla/plugins/libflashplayer.so
57 rm -f \$1/opt/google/chrome/plugins/libgcflashplayer.so
58 rm -f \$1/usr/lib/opera/plugins/libflashplayer.so
59 status
60 }
61 EOT
63 set +e