gtk/pepperflashplugin/pepperflashplugin.install
2016-02-12 23:51:14 +01:00

60 lines
1.6 KiB
Plaintext

CHROME_URL=https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
CHROME_SHA256=e23ac95948c6b6adbc938244b66e733cffcf4af00c4e9be51b8e23106cd0e698
PEPFLASH_MD5=c92d8043cda40f67fd932c37a2a8219e
MANIFEST_MD5=66d5ada543b5df03a779e05395e4a3b3
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
}