get-scripts annotate 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 |
rev | line source |
---|---|
pascal@11 | 1 WEB_SITE="http://www.adobe.com/products/flash/" |
pascal@11 | 2 SHORT_DESC="Adobe Flash Player." |
pascal@11 | 3 TARBALL="install_flash_player_11_linux.i386.tar.gz" |
pascal@11 | 4 |
pascal@11 | 5 WGET_URL=http://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/$TARBALL |
pascal@11 | 6 busybox wget -O $TARBALL $WGET_URL |
pascal@11 | 7 [ -f $TARBALL ] || abort_package "Could not download $TARBALL. Exiting." |
pascal@11 | 8 tar xzf $TARBALL |
pascal@11 | 9 VERSION="$(strings libflashplayer.so | sed '/FlashPlayer_/!d;s/.*yer_\(.*\)_Flash.*/\1/;s/_/./g')" |
pascal@11 | 10 |
pascal@11 | 11 # Install files |
pascal@11 | 12 chmod 755 libflashplayer.so |
pascal@11 | 13 chown root.root libflashplayer.so |
pascal@11 | 14 dir=$PACKAGE-$VERSION/fs |
pascal@11 | 15 mkdir -p $dir/usr/share/flash |
pascal@11 | 16 mv libflashplayer.so $dir/usr/share/flash |
pascal@11 | 17 mv usr/bin $dir/usr |
pascal@11 | 18 mv usr/share/icons $dir/usr/share |
pascal@11 | 19 mv usr/share/pixmaps $dir/usr/share |
pascal@11 | 20 |
pascal@11 | 21 # Sanity Check: Reexport firefox libraries if they don't exist |
pascal@11 | 22 dir=$PACKAGE-$VERSION/fs/usr/lib |
pascal@11 | 23 mkdir -p $dir |
pascal@11 | 24 for i in /usr/lib/firefox/*.so ; do |
pascal@11 | 25 [ -f $i ] && [ -z "`ls /usr/lib/$(basename $i)`" ] && ln -s $i $dir |
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 |
pascal@11 | 62 |
pascal@11 | 63 set +e |