get-scripts view flash-plugin @ rev 63

Add nanozip
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 10 14:15:08 2016 +0200 (2016-08-10)
parents 2cdf3e534506
children c2d95308d39b
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
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 USR=$PACKAGE-$VERSION/fs/usr
16 mkdir -p $USR/share/flash $USR/lib
17 mv libflashplayer.so $USR/share/flash
18 mv usr/bin $USR
19 mv usr/share/icons usr/share/pixmaps usr/share/applications $USR/share
21 # Sanity Check: Reexport firefox libraries if they don't exist
22 for i in /usr/lib/firefox/*.so ; do
23 [ -f $i ] && [ -z "$(ls /usr/lib/$(basename $i 2> /dev/null))" ] &&
24 ln -s $i $USR/lib
25 done
27 # Create pseudo package
28 cat > $PACKAGE-$VERSION/receipt <<EOT
29 PACKAGE="$PACKAGE"
30 VERSION="$VERSION"
31 CATEGORY="non-free"
32 SHORT_DESC="$SHORT_DESC"
33 WEB_SITE="$WEB_SITE"
34 DEPENDS="libfirefox curl atk cairo expat fontconfig freetype glib gtk+ libpng \
35 nss pango pixman xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
36 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
37 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXt zlib"
39 post_install()
40 {
41 echo -n "Processing post install commands..."
43 [ -d \$1/usr/lib/mozilla/plugins ] || mkdir -p \$1/usr/lib/mozilla/plugins
44 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/mozilla/plugins
45 [ -d \$1/opt/google/chrome/plugins ] || mkdir -p \$1/opt/google/chrome/plugins
46 ln -s /usr/share/flash/libflashplayer.so \$1/opt/google/chrome/plugins/libgcflashplayer.so
47 [ -d \$1/usr/lib/opera/plugins ] || mkdir -p \$1/usr/lib/opera/plugins
48 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/opera/plugins/libflashplayer.so
49 status
50 }
52 post_remove()
53 {
54 echo -n "Processing post remove commands..."
55 rm -f \$1/usr/lib/mozilla/plugins/libflashplayer.so
56 rm -f \$1/opt/google/chrome/plugins/libgcflashplayer.so
57 rm -f \$1/usr/lib/opera/plugins/libflashplayer.so
58 status
59 }
60 EOT