gtk/pepperflashplugin/PKGBUILD
2015-12-09 12:46:15 +00:00

38 lines
1.8 KiB
Bash

pkgname=pepperflashplugin
pkgdesc="Adobe/Google Pepper Flash Player plugin installer"
pkgver=20.0.0.228
pkgrel=1
arch=('any')
url="http://www.google.com/chrome"
license=('custom:chrome')
install=pepperflashplugin.install
depends=('rpmextract')
source=(chrome_pepper-${pkgver}::https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
license.html::https://www.google.com/chrome/intl/en/eula_text.html
chromium_pepperflashplayer.sh)
sha256sums=('416563ca102daf61f54b4ff0e5418b1e558bf45cc662d8c1588646665443629d'
'b35811bb330576631e64f7885c66720e0be4ca81afb04328b3a0f288a708e37f'
'747c53cba599662ccbce48b7961ca8bf64474a7cf7d751a49b4d063a31269d6a')
package() {
# create required directories
install -d "${pkgdir}"/usr/lib/PepperFlash
# copy the script to enable pepperflash con chromium
install -m644 "$srcdir/chromium_pepperflashplayer.sh" "$pkgdir/usr/lib/PepperFlash/chromium_pepperflashplayer.sh"
sed -i "s/\@FLASH_VERSION\@/$pkgver/" "$pkgdir/usr/lib/PepperFlash/chromium_pepperflashplayer.sh"
# copy the script to enable pepperflash con chromium
sed -i "s|CHROME_URL=.*|CHROME_URL=${source[0]#*::}|" "$startdir/pepperflashplugin.install"
sed -i "s/CHROME_SHA256=.*/CHROME_SHA256=${sha256sums[0]}/" "$startdir/pepperflashplugin.install"
PEPFLASH_MD5=$(md5sum "$srcdir/opt/google/chrome/PepperFlash/libpepflashplayer.so" | sed -e 's/\s.*//g')
MANIFEST_MD5=$(md5sum "$srcdir/opt/google/chrome/PepperFlash/manifest.json" | sed -e 's/\s.*//g')
echo $PEPFLASH_MD5
sed -i "s/PEPFLASH_MD5=.*/PEPFLASH_MD5=$PEPFLASH_MD5/" "$startdir/pepperflashplugin.install"
sed -i "s/MANIFEST_MD5=.*/MANIFEST_MD5=$MANIFEST_MD5/" "$startdir/pepperflashplugin.install"
# copy license
install -Dm644 "${srcdir}"/license.html "${pkgdir}"/usr/share/licenses/${pkgname}/license.html
}