Вот содержимое файла:
#!/bin/sh
# postinst script for flashplugin-installer
#
# see: dh_installdeb(1)
set -e
FLASH_VERSION=10.0.22.87
FILENAME=adobe-flashplugin_${FLASH_VERSION}.orig.tar.gz
SHA256SUM_TGZ="cf35f2cadddd5f76246e199f42502d111f7c2064c95aad1ce6f91b478a4a0e00"
PARTNER_URL=http://archive.canonical.com/pool/partner/a/adobe-flashplugin/$FILENAME
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see
http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
VARIANTS="iceape iceweasel mozilla firefox xulrunner midbrowser xulrunner-addons"
. /usr/share/debconf/confmodule
# previously : flashplayer10_install_linux_091508.tar.gz and install_flash_player_10_linux/
# currently : install_flash_player_10_linux.tar.gz and install_flash_player_10_linux/
fp_exit_with_error() {
echo $1
echo "The Flash plugin is NOT installed."
db_fset flashplugin-installer/local seen false
db_fset flashplugin-installer/httpget seen false
db_set flashplugin-installer/httpget false
exit 0 # still install the Debian package, undoes the fix for #387263
}
fp_download_and_unpack() {
cd /var/cache/flashplugin-installer
db_get flashplugin-installer/local
if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
echo "Installing from local file $RET/$FILENAME"
cp -f -p "$RET"/$FILENAME ${FILENAME}_TEMP
mv -f ${FILENAME}_TEMP $FILENAME
else # no local file
db_get flashplugin-installer/httpget
if [ "$RET" != "true" ]; then
fp_exit_with_error "download or license refused"
fi
# setting wget options
:> wgetrc
echo "noclobber = off" >> wgetrc
echo "dir_prefix = ." >> wgetrc
echo "dirstruct = off" >> wgetrc
echo "verbose = on" >> wgetrc
echo "progress = dot:default" >> wgetrc
# downloading the plugin
echo "Downloading..."
rm -f $FILENAME
WGETRC=wgetrc wget $PARTNER_URL \
|| fp_exit_with_error "download failed"
rm -f wgetrc
echo "Download done."
fi # end if local file
# verify SHA256 checksum of (copied or downloaded) tarball
rm -rf adobe_flashplugin*/
echo "$SHA256SUM_TGZ $FILENAME" | sha256sum -c > /dev/null 2>&1 \
|| fp_exit_with_error "sha256sum mismatch $FILENAME"
# unpacking and checking the plugin
tar xzf $FILENAME || fp_exit_with_error "cannot unpack plugin"
}
OLDDIR=/usr/lib/flashplugin-installer-unpackdir
NEWDIR=/var/cache/flashplugin-installer
safe_move() {
[ ! -f $OLDDIR/$1 ] || [ -f $NEWDIR/$1 ] || mv $OLDDIR/$1 $NEWDIR/$1 2> /dev/null || true
[ ! -f $OLDDIR/$1 ] || [ ! -f $NEWDIR/$1 ] || rm -f $OLDDIR/$1 2> /dev/null || true
}
case "$1" in
configure)
fp_download_and_unpack
install -m 644 adobe-flashplugin*/libflashplayer.so /usr/lib/flashplugin-installer/
rm -rf adobe-flashplugin*
echo "Flash Plugin installed."
if test ! -x /usr/bin/nspluginwrapper; then
for p in $VARIANTS; do
update-alternatives --install "/usr/lib/$p/plugins/flashplugin-alternative.so" "$p-flashplugin" /usr/lib/flashplugin-installer/libflashplayer.so 50
if readlink /etc/alternatives/"$p-flashplugin" | grep -c flashplugin-nonfree >/dev/null; then
update-alternatives --set "$p-flashplugin" /usr/lib/flashplugin-installer/libflashplayer.so
fi
done
else
NSPLUGIN_DIR=/var/lib/flashplugin-installer/ /usr/bin/nspluginwrapper -n -i /usr/lib/flashplugin-installer/libflashplayer.so
for p in $VARIANTS; do
update-alternatives --install "/usr/lib/$p/plugins/flashplugin-alternative.so" "$p-flashplugin" /var/lib/flashplugin-installer/npwrapper.libflashplayer.so 50
if readlink /etc/alternatives/"$p-flashplugin" | grep -c flashplugin-nonfree >/dev/null; then
update-alternatives --set "$p-flashplugin" /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
fi
done
fi
safe_move FP9_plugin_beta_101806.tar.gz
safe_move FP9_plugin_beta_112006.tar.gz
safe_move install_flash_player_7_linux.tar.gz
safe_move install_flash_player_9_linux.tar.gz
safe_move flashplayer10_install_linux_051508.tar.gz
safe_move flashplayer10_install_linux_070208.tar.gz
safe_move flashplayer10_install_linux_091508.tar.gz
rmdir $OLDDIR 2> /dev/null || true
db_fset flashplugin-installer/local seen false
db_fset flashplugin-installer/httpget seen false
db_set flashplugin-installer/httpget false
;;
abort-upgrade|abort-remove|abort-deconfigure)
echo "postinst called with argument \`$1'" >&2
exit 1
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
# vim: ts=2 sw=2