get-scripts view flash-plugin @ rev 61

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