Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 730b3fe75daf8b1c9124f4200447b118 > scriptlet

flash-player-plugin-11.1.102.55-1.mga1.nonfree.i586.rpm

PREIN

/bin/sh
checkmd5sum() {
	[ -e "$1" ] || return 1
	FILEMD5="$(md5sum $1 | cut -d" " -f1)"
	[ -n "$FILEMD5" ] || return 1
	MD5NUM=1
	eval MD5SUM="\$MD5SUM$MD5NUM"
	while [ "$MD5SUM" ]; do
		[ "$MD5SUM" = "$FILEMD5" ] && return 0
		MD5NUM=$((MD5NUM+1))
		eval MD5SUM="\$MD5SUM$MD5NUM"
	done
	return 1
}
MD5SUM1="32a639c39ca582255038969e6ab4b65e"
MD5SUM2="9d7bff45560e05904e6535af79280e6d"
MD5SUM3=""
MD5SUM4=
URL1="http://fpdownload.macromedia.com/get/flashplayer/pdc/11.1.102.55/flash-plugin-11.1.102.55-release.i386.rpm"
URL2="http://linuxdownload.adobe.com/linux/i386/flash-plugin-11.1.102.55-release.i386.rpm"
URL3=""
URL4=

URLNUM=1

install -d -m 0755 /var/lib/flash-player-plugin

echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
while ! checkmd5sum "/var/lib/flash-player-plugin/flash-plugin-11.1.102.55-release.i386.rpm"; do
	eval URL="\$URL$URLNUM"
	if [ -z "$URL" ]; then
		echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
		echo "       being too old. Please file a bug report at https://bugs.mageia.org" >&2
		echo "       so that the package gets updated. Thank you." >&2
		echo "" >&2
		echo "       In the meantime, you can download Flash Player manually from" >&2
		echo "       http://get.adobe.com/flashplayer/" >&2
		rm -f "/var/lib/flash-player-plugin/flash-plugin-11.1.102.55-release.i386.rpm"
		[ "$(ls -A "/var/lib/flash-player-plugin")" ] && rm -rf "/var/lib/flash-player-plugin"
		exit 1
	fi
	URLNUM=$((URLNUM+1))
	echo "Downloading from $URL:"
	curl --connect-timeout 20 -m 10800 -L "$URL" > "/var/lib/flash-player-plugin/flash-plugin-11.1.102.55-release.i386.rpm"
done

POSTIN

/bin/sh
FILE1_SRC="usr/lib/flash-plugin/libflashplayer.so"
FILE1_DST="/usr/lib/mozilla/plugins/libflashplayer.so"
FILE1_PRM="0755"
FILE2_SRC="usr/lib/flash-plugin/LICENSE"
FILE2_DST="/usr/lib/mozilla/plugins/LICENSE.flashplayer"
FILE2_PRM="0644"
FILE3_SRC="usr/lib/flash-plugin/README"
FILE3_DST="/usr/lib/mozilla/plugins/README.flashplayer"
FILE3_PRM="0644"

FILE4_SRC="usr/bin/flash-player-properties"
FILE4_DST="/usr/bin/flash-player-properties"
FILE4_PRM="0755"
FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
FILE5_DST="/usr/share/applications/flash-player-properties.desktop"
FILE5_PRM="0644"

FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
FILE6_DST="/usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
FILE6_PRM="0644"
FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
FILE7_DST="/usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
FILE7_PRM="0644"
FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
FILE8_DST="/usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
FILE8_PRM="0644"
FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
FILE9_DST="/usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
FILE9_PRM="0644"
FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
FILE10_DST="/usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
FILE10_PRM="0644"
FILE11_SRC=

. /usr/share/flash-player-plugin/functions
tar_extract

# show in KDE as well (in case user doesn't have -kde subpkg
sed -i 's,NotShowIn=KDE;,,' /usr/share/applications/flash-player-properties.desktop 2>/dev/null || :
# otherwise KDE hides it:
sed -i 's,GNOME;,,' /usr/share/applications/flash-player-properties.desktop 2>/dev/null || :

echo "Adobe Flash Player installation successful."