mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-01-24 01:42:13 +08:00
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
CHROME_URL=https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
|
|
CHROME_SHA256=416563ca102daf61f54b4ff0e5418b1e558bf45cc662d8c1588646665443629d
|
|
PEPFLASH_MD5=471e426e4cf7397d996dab42cef5d302
|
|
MANIFEST_MD5=1ade2075686fe20771406c5ef1aa8f2f
|
|
|
|
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
|
|
}
|