get-scripts annotate flash-plugin @ rev 80

libreoffice: fix menu entries (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 09 11:40:00 2019 +0200 (2019-06-09)
parents c2d95308d39b
children
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
mojo@66 5 VERSION="$(wget -q -O - http://www.adobe.com/software/flash/about/ | sed -n '/Linux/,/<\/tr/s/[^>]*>\([0-9].*\)<.*/\1/p')"
mojo@64 6 TARBALL="flash_player_npapi_linux.i386.tar.gz"
mojo@66 7 WGET_URL=https://fpdownload.adobe.com/get/flashplayer/pdc/$VERSION/$TARBALL
mojo@64 8 wget --no-check-certificate -O $TARBALL $WGET_URL
pascal@63 9 [ -f $TARBALL ] || abort_package
pascal@11 10 tar xzf $TARBALL
mojo@66 11
pascal@11 12
pascal@11 13 # Install files
pascal@11 14 chmod 755 libflashplayer.so
pascal@11 15 chown root.root libflashplayer.so
pascal@63 16 USR=$PACKAGE-$VERSION/fs/usr
pascal@63 17 mkdir -p $USR/share/flash $USR/lib
pascal@63 18 mv libflashplayer.so $USR/share/flash
pascal@63 19 mv usr/bin $USR
pascal@63 20 mv usr/share/icons usr/share/pixmaps usr/share/applications $USR/share
pascal@11 21
pascal@11 22 # Sanity Check: Reexport firefox libraries if they don't exist
pascal@11 23 for i in /usr/lib/firefox/*.so ; do
pascal@63 24 [ -f $i ] && [ -z "$(ls /usr/lib/$(basename $i 2> /dev/null))" ] &&
pascal@63 25 ln -s $i $USR/lib
pascal@11 26 done
pascal@11 27
pascal@11 28 # Create pseudo package
pascal@11 29 cat > $PACKAGE-$VERSION/receipt <<EOT
pascal@11 30 PACKAGE="$PACKAGE"
pascal@11 31 VERSION="$VERSION"
pascal@11 32 CATEGORY="non-free"
pascal@11 33 SHORT_DESC="$SHORT_DESC"
pascal@11 34 WEB_SITE="$WEB_SITE"
pascal@11 35 DEPENDS="libfirefox curl atk cairo expat fontconfig freetype glib gtk+ libpng \
pascal@11 36 nss pango pixman xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
pascal@11 37 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
pascal@11 38 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXt zlib"
pascal@11 39
pascal@11 40 post_install()
pascal@11 41 {
pascal@11 42 echo -n "Processing post install commands..."
pascal@11 43
pascal@11 44 [ -d \$1/usr/lib/mozilla/plugins ] || mkdir -p \$1/usr/lib/mozilla/plugins
pascal@11 45 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/mozilla/plugins
pascal@11 46 [ -d \$1/opt/google/chrome/plugins ] || mkdir -p \$1/opt/google/chrome/plugins
pascal@11 47 ln -s /usr/share/flash/libflashplayer.so \$1/opt/google/chrome/plugins/libgcflashplayer.so
pascal@11 48 [ -d \$1/usr/lib/opera/plugins ] || mkdir -p \$1/usr/lib/opera/plugins
pascal@11 49 ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/opera/plugins/libflashplayer.so
pascal@11 50 status
pascal@11 51 }
pascal@11 52
pascal@11 53 post_remove()
pascal@11 54 {
pascal@11 55 echo -n "Processing post remove commands..."
pascal@11 56 rm -f \$1/usr/lib/mozilla/plugins/libflashplayer.so
pascal@11 57 rm -f \$1/opt/google/chrome/plugins/libgcflashplayer.so
pascal@11 58 rm -f \$1/usr/lib/opera/plugins/libflashplayer.so
pascal@11 59 status
pascal@11 60 }
pascal@11 61 EOT