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