From c360f748da68dbe18914e24f624f7b238ea5a5c6 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 15 Dec 2015 18:25:12 -0500 Subject: [PATCH] fix firefox extension signing issues --- trunk/PKGBUILD | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 29cb811..03fa5c5 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -1,28 +1,44 @@ # $Id$ # Maintainer: speps +# Contributor: Eschwartz -pkgname=firefox-raismth +_pkgname=raismth +pkgname=firefox-${_pkgname} pkgver=4.0.1 -pkgrel=1 +pkgrel=2 +_file=223601 pkgdesc="Firefox extension for watching Rai.tv live channels, vod and replay contents w/o *light (Silverlight/Moonlight)" arch=('any') url="http://acab.servebeer.com/" license=('GPL3') groups=('firefox-addons') depends=('firefox') +makedepends=('unzip') optdepends=('mplayer: default video player' 'faad: default audio player') provides=('raismth') -source=("${url}raismth-$pkgver.xpi") -md5sums=('098f7d5a2e50a28006aa3a86cbdbf53e') +# The website appears to be dead, so download from AMO. +source=("https://addons.mozilla.org/firefox/downloads/file/${_file}/${_pkgname}-${pkgver}.xpi") +noextract=("${_pkgname}-${pkgver}.xpi") +md5sums=('964f87871ee0173be0c0d8af1d76a2a1') + +prepare() { + cd "${srcdir}" + unzip -qqo "${_pkgname}-${pkgver}.xpi" -d "${_pkgname}-${pkgver}" +} package() { - cd "$srcdir" + cd "${srcdir}" - # extension - _dest="$pkgdir/usr/lib/firefox/browser/extensions/raismth@mitm.rc" - find . -type d -exec install -d {} $_dest/{} \; - find . -type f -exec install -Dm644 {} $_dest/{} \; + _extension_id="$(sed -n '/.*\(.*\)<\/em:id>.*/{s//\1/p;q}' ${_pkgname}-${pkgver}/install.rdf)" + _extension_dest="${pkgdir}/usr/lib/firefox/browser/extensions/${_extension_id}" + if grep 'true' ${_pkgname}-${pkgver}/install.rdf > /dev/null; then + install -dm755 "${_extension_dest}" + cp -R ${_pkgname}-${pkgver}/* "${_extension_dest}" + chmod -R ugo+rX "${_extension_dest}" + else + install -Dm644 ${_pkgname}-${pkgver}.xpi "${_extension_dest}.xpi" + fi } # vim:set ts=2 sw=2 et: -- 2.6.4