2015-01-27 17:41:59 +08:00
|
|
|
CHROME_URL=https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
|
2015-11-12 10:58:08 +08:00
|
|
|
CHROME_SHA256=bf2d446b42520b00f9a3ec3763c8c3c33632db7c2385270dc4dfb3e5401371b8
|
|
|
|
PEPFLASH_MD5=6ecdee7d08b0419018976fddd39c4524
|
|
|
|
MANIFEST_MD5=90dd5fdb0f6e75cb7a3476b57e3a04e2
|
2015-01-11 08:17:47 +08:00
|
|
|
|
2015-01-16 05:53:34 +08:00
|
|
|
DIR=/usr/lib/PepperFlash
|
2015-01-11 08:17:47 +08:00
|
|
|
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
|
2015-01-20 06:55:57 +08:00
|
|
|
echo "nothing to do, you are already using the latest pepperflash plugin provided by Chakra"
|
2015-01-11 08:17:47 +08:00
|
|
|
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:
|
|
|
|
|
2015-01-16 05:53:34 +08:00
|
|
|
. /usr/lib/PepperFlash/chromium_pepperflashplayer.sh
|
2015-01-11 08:17:47 +08:00
|
|
|
|
|
|
|
(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
|
|
|
|
}
|
|
|
|
|
2015-01-16 05:53:34 +08:00
|
|
|
pre_remove() {
|
2015-01-11 08:17:47 +08:00
|
|
|
rm $DIR/libpepflashplayer.so
|
|
|
|
rm $DIR/manifest.json
|
|
|
|
}
|