diff options
Diffstat (limited to 'extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild')
-rwxr-xr-x | extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild | 129 |
1 files changed, 90 insertions, 39 deletions
diff --git a/extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild b/extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild index e61ce917..48c7acea 100755 --- a/extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild +++ b/extra/source/flashplayer-plugin/flashplayer-plugin.SlackBuild @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2008, 2009, 2010 Eric Hameleers, Eindhoven, NL +# Copyright 2008, 2009, 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -26,27 +26,50 @@ # By: Eric Hameleers <alien@slackware.com> # For: flashplayer-plugin # Descr: Adobe flash player plugin for mozilla -# URL: http://labs.adobe.com/technologies/flashplayer10/ +# URL: +# http://labs.adobe.com/technologies/flashplatformruntimes/flashplayer11/ # Needs: # Changelog: -# 10.0.d20.7-1: 16/Dec/2008 by Eric Hameleers <alien@slackware.com> -# * Initial build. -# 10.0.d21.1-1: 20/Dec/2008 by Eric Hameleers <alien@slackware.com> -# * Update. -# 10.0.22.87-1: 26/feb/2009 by Eric Hameleers <alien@slackware.com> -# * Update (plugs vulnerability). -# 10.0.32.18-1: 10/aug/2009 by Patrick J. Volkerding <volkerdi@slackware.com> -# * Update (plugs vulnerability). -# 10.0.42.34-1: 14/dec/2009 by Patrick J. Volkerding <volkerdi@slackware.com> -# * Update (plugs vulnerability). -# 10.091510-1: 15/sep/2010 by Eric Hameleers <alien@slackware.com> -# * Preview1 of "flash player square". -# 10.092710-1: 28/sep/2010 by Eric Hameleers <alien@slackware.com> -# * Preview2 of "flash player square". -# 10_2.111710-1:28/sep/2010 by Eric Hameleers <alien@slackware.com> -# * New preview of "flash player square" for 64-bit Linux; there -# is no more 32-bit "square" version, because new developments -# are being folded into regular flashplayer10. +# 10.0.d20.7-1: 16/Dec/2008 by Eric Hameleers <alien@slackware.com> +# * Initial build. +# 10.0.d21.1-1: 20/Dec/2008 by Eric Hameleers <alien@slackware.com> +# * Update. +# 10.0.22.87-1: 26/feb/2009 by Eric Hameleers <alien@slackware.com> +# * Update (plugs vulnerability). +# 10.0.32.18-1: 10/aug/2009 by Patrick J. Volkerding <volkerdi@slackware.com> +# * Update (plugs vulnerability). +# 10.0.42.34-1: 14/dec/2009 by Patrick J. Volkerding <volkerdi@slackware.com> +# * Update (plugs vulnerability). +# 10.091510-1: 15/sep/2010 by Eric Hameleers <alien@slackware.com> +# * Preview1 of "flash player square". +# 10.092710-1: 28/sep/2010 by Eric Hameleers <alien@slackware.com> +# * Preview2 of "flash player square". +# 10_2.111710-1: 28/sep/2010 by Eric Hameleers <alien@slackware.com> +# * New preview of "flash player square" for 64-bit Linux; there +# is no more 32-bit "square" version, because new developments +# are being folded into regular flashplayer10. +# 11b1.071311-1: 25/jul/2011 by Eric Hameleers <alien@slackware.com> +# * Update to version 11 beta 1. +# Looks like 64-bit support has finally been folded into the +# mainstream development of the plugin. +# 11b1.080811-1: 12/aug/2011 by Eric Hameleers <alien@slackware.com> +# * Update to version 11 beta 2. +# 11r1.090611-1: 11/sep/2011 by Eric Hameleers <alien@slackware.com> +# * Update to version 11 release candidate 1. +# 11.0.1.152-1: 04/oct/2011 by Eric Hameleers <alien@slackware.com> +# * Update to stable release 11! +# 11.1.102.55-1: 05/feb/2012 by Eric Hameleers <alien@slackware.com> +# * Update to release 11.1. +# 11.1.102.62-1: 05/feb/2012 by Eric Hameleers <alien@slackware.com> +# * Minor update. +# 11.2.202.228-1:29/mar/2012 by Eric Hameleers <alien@slackware.com> +# * Minor update. +# 11.2.202.233-1:20/apr/2012 by Eric Hameleers <alien@slackware.com> +# * Minor update. +# 11.2.202.235-1:05/may/2012 by Eric Hameleers <alien@slackware.com> +# * Minor update. +# 11.2.202.236-1:19/jun/2012 by Eric Hameleers <alien@slackware.com> +# * Minor update. # # Run 'sh flashplayer-plugin.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -57,10 +80,10 @@ # Set initial variables: PRGNAM=flashplayer-plugin -SRCVER=${SRCVER:-10_2} -BLDVER=${BLDVER:-111710} -VERSION=$SRCVER.$BLDVER +VERSION=${VERSION:-"11.2.202.236"} +MAJVER=$(echo $VERSION | cut -d. -f1) BUILD=${BUILD:-1} +TAG=${TAG:-"alien"} # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -72,7 +95,7 @@ OUTPUT=${OUTPUT:-/tmp} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i386 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; @@ -81,12 +104,10 @@ fi case "$ARCH" in x86_64) - PREVER=${PREVER:-3} LIBDIRSUFFIX="64" ARCHBITS="64" ;; i?86) - PREVER=${PREVER:-2} LIBDIRSUFFIX="" ARCHBITS="32" ;; @@ -96,8 +117,8 @@ case "$ARCH" in ;; esac -SOURCE="$SRCDIR/flashplayer${SRCVER}_p${PREVER}_${ARCHBITS}bit_linux_${BLDVER}.tar.gz" -SRCURL="http://download.macromedia.com/pub/labs/flashplayer10/flashplayer${SRCVER}_p${PREVER}_${ARCHBITS}bit_linux_${BLDVER}.tar.gz" +SOURCE="$SRCDIR/install_flash_player_${VERSION}_linux.${ARCH}.tar.gz" +SRCURL="http://fpdownload.macromedia.com/get/flashplayer/pdc/${VERSION}/install_flash_player_${MAJVER}_linux.${ARCH}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -110,6 +131,10 @@ trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR set -u P1=${1:-1} +# Save old umask and set to 0022: +_UMASK_=$(umask) +umask 0022 + # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source @@ -121,10 +146,11 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then @@ -149,7 +175,8 @@ echo "++" echo "|| $PRGNAM-$VERSION" echo "++" -cd $TMP/tmp-$PRGNAM +#cd $TMP/tmp-$PRGNAM +cd $PKG echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} chown -R root:root * @@ -168,13 +195,34 @@ case "$ARCH" in ;; esac -# Install the plugin to the package dir: -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins -install -m 0755 libflashplayer.so \ - $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins/libflashplayer.so +## Move lib to lib64 if needed: +#[ "$ARCH" = "x86_64" ] && mv usr/lib usr/lib${LIBDIRSUFFIX} + +# Install the plugin to the mozilla plugins dir and fix library file attributes: +mkdir -p usr/lib${LIBDIRSUFFIX}/mozilla/plugins +mv libflashplayer.so usr/lib${LIBDIRSUFFIX}/mozilla/plugins/ +find usr/lib${LIBDIRSUFFIX} -name "*.so" -exec chmod 755 {} \; + +# Add this to the doinst.sh: +mkdir -p $PKG/install +cat <<EOINS >> $PKG/install/doinst.sh +# Update the desktop database: +if [ -x usr/bin/update-desktop-database ]; then + chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 +fi + +# Update hicolor theme cache: +if [ -d usr/share/icons/hicolor ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null + fi +fi + +EOINS # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv *.txt $PKG/usr/doc/$PRGNAM-$VERSION/ || true cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; @@ -185,9 +233,12 @@ cat $SRCDIR/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT -md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz.md5 +md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5 cd - -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt +cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt + +# Restore the original umask: +umask ${_UMASK_} |