gtk/pepperflashplugin/pepperflashplugin.install
2015-01-18 12:24:43 +00:00

60 lines
1.6 KiB
Plaintext

CHROME_URL=chrome_pepper-16.0.0.257::https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
CHROME_SHA256=940cb6f8cf999e78682be0d7922006ca0a32d8f9cc745a511985a34a5f13a4db
PEPFLASH_MD5=43dc03a4641d4a039b829703a6d1cc78
MANIFEST_MD5=b4d5129fb90aaab66da81528f8802acd
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 using already 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
}