gtk/pepperflashplugin/pepperflashplugin.install
2015-11-12 02:58:08 +00:00

60 lines
1.6 KiB
Plaintext

CHROME_URL=https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
CHROME_SHA256=bf2d446b42520b00f9a3ec3763c8c3c33632db7c2385270dc4dfb3e5401371b8
PEPFLASH_MD5=6ecdee7d08b0419018976fddd39c4524
MANIFEST_MD5=90dd5fdb0f6e75cb7a3476b57e3a04e2
DIR=/usr/lib/PepperFlash
TMP_DIR=/tmp/pepperflashplugin-installer
pepperflashplugin-installer() {
[ -d $TMP_DIR ] && rm -rf $TMP_DIR
mkdir $TMP_DIR
cd $TMP_DIR
# Don't download a new Google Chrome package if the user already has
# identical plugin/manifest files installed
echo "$PEPFLASH_MD5 $DIR/libpepflashplayer.so
$MANIFEST_MD5 $DIR/manifest.json" > md5sums.check
if md5sum -c md5sums.check
then
echo "nothing to do, you are already using the latest pepperflash plugin provided by Chakra"
else
wget $CHROME_URL
rpm2cpio google-chrome*| bsdtar -xf -
cp opt/google/chrome/PepperFlash/libpepflashplayer.so $DIR/libpepflashplayer.so
cp opt/google/chrome/PepperFlash/manifest.json $DIR/manifest.json
fi
}
instructions() {
/bin/cat << EOF
MAKING CHROMIUM USE PEPPER FLASH
To enable the use of Pepper Flash with Chromium, append the following line
to /etc/chromium/default:
. /usr/lib/PepperFlash/chromium_pepperflashplayer.sh
(I.e. a period, then a space, then the filepath.)
Restart Chromium, and load the chrome://plugins page to verify that the plugin is active.
EOF
}
post_install() {
post_upgrade
instructions
}
post_upgrade() {
pepperflashplugin-installer
}
pre_remove() {
rm $DIR/libpepflashplayer.so
rm $DIR/manifest.json
}