From eb8b5915ff0229238e3ef87f809a4a3026641f81 Mon Sep 17 00:00:00 2001 From: Josh Gillies Date: Mon, 4 Nov 2013 00:12:30 -0500 Subject: [PATCH] added aur/chromium-pepper-flash --- aur/chromium-pepper-flash/PKGBUILD | 25 +++++++++++ .../chromium-pepper-flash.install | 44 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 aur/chromium-pepper-flash/PKGBUILD create mode 100644 aur/chromium-pepper-flash/chromium-pepper-flash.install diff --git a/aur/chromium-pepper-flash/PKGBUILD b/aur/chromium-pepper-flash/PKGBUILD new file mode 100644 index 000000000..46ccb131c --- /dev/null +++ b/aur/chromium-pepper-flash/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Justin Dray + +pkgname=chromium-pepper-flash-armv7h +pkgdesc="Google Chrome's Pepper Flash plugin for Chromium on armv7h" +pkgver=11.7.700.225 +pkgrel=3 +arch=('armv7h') +url="http://www.google.com/chrome" +license=('custom:chrome') +depends=('chromium') +provides=("chromium-pepper-flash=${pkgver}") +optdepends=('pulseaudio-alsa: For PulseAudio users') +install=chromium-pepper-flash.install +source=('license.html::http://www.google.com/chrome/intl/en/eula_text.html' + "http://mirror.nekinie.com/chromium-pepper-flash-armv7h/PepperFlash-${pkgver}-armv7h.tar.gz") + # Backup (slow) mirror "https://www.dray.be/PepperFlash-${pkgver}-armv7h.tar.gz" +md5sums=('ba19ea498f294975d320ff0b26a6cd63' + '7631da586071874409dac066f85ca567') + +package() { + install -d "${pkgdir}/usr/lib/PepperFlash" + install -m644 ${srcdir}/PepperFlash/* "${pkgdir}/usr/lib/PepperFlash" + sed -i "s/flashver=.*/flashver=${pkgver}/" "${startdir}/chromium-pepper-flash.install" + install -Dm644 "${srcdir}/license.html" "${pkgdir}/usr/share/licenses/${pkgname}/license.html" +} diff --git a/aur/chromium-pepper-flash/chromium-pepper-flash.install b/aur/chromium-pepper-flash/chromium-pepper-flash.install new file mode 100644 index 000000000..b2ea6677e --- /dev/null +++ b/aur/chromium-pepper-flash/chromium-pepper-flash.install @@ -0,0 +1,44 @@ +[ -f etc/chromium-browser/default ] && _default='etc/chromium-browser/default' +[ -f etc/chromium/default ] && _default='etc/chromium/default' +flashver=11.7.700.225 + +instructions() { + + /bin/cat << EOF + +Disable all other flash plugins: +Type chrome://plugins/ in the adress bar and press Enter +Click on Details button on the top right +Click on Disable near all the Flash plugins except the first one + +EOF + +} + +post_upgrade() +{ + + if [[ $(cat "$_default") == *ppapi* ]]; then + sed -i "s/ppapi-flash-version=.*[0-9]/ppapi-flash-version=$flashver/g" "$_default" + else + sed -i '/CHROMIUM_FLAGS/s|"$| --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version='$flashver'"|' "$_default" + fi + +} + +post_install() { + + post_upgrade + + instructions + +} + +post_remove() { + + if [ -f "$_default" ]; then + sed -i 's| --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=1.*[0-999]||' "$_default" + else + : # do nothing + fi +}