From 33a0d7dc31a768ce6fbf951830fc48c9ab8a6c1b Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 15 Dec 2015 18:25:37 -0500 Subject: [PATCH] fix firefox extension signing issues Also update to the latest version --- trunk/PKGBUILD | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index e3948c1..31ffd7e 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -1,28 +1,45 @@ # $Id$ # Maintainer: speps +# Contributor: Eschwartz -pkgname=firefox-firebug -pkgver=2.0.8 +_pkgname=firebug +pkgname=firefox-${_pkgname} +pkgver=2.0.13 pkgrel=1 +_file=359288 pkgdesc="Firefox extension with tools for web development." arch=(any) url="http://getfirebug.com/" license=('custom:BSD') groups=('firefox-addons') depends=('firefox') +makedepends=('unzip') provides=('firebug') -source=("${url}releases/firebug/${pkgver%.*}/firebug-$pkgver.xpi") -md5sums=('de60ceef13c3d17d2f6ce4f68acc367b') +source=("https://addons.mozilla.org/firefox/downloads/file/${_file}/${_pkgname}-${pkgver}.xpi") +noextract=("${_pkgname}-${pkgver}.xpi") +md5sums=('8f33843ba588a74d974088a3ef49861f') + +prepare() { + cd "${srcdir}" + unzip -qqo "${_pkgname}-${pkgver}.xpi" -d "${_pkgname}-${pkgver}" +} package() { + cd "${srcdir}" + # extension - _dest="$pkgdir/usr/lib/firefox/browser/extensions/firebug@software.joehewitt.com" - 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 # license - install -Dm644 license.txt \ - "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 ${_pkgname}-${pkgver}/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } # vim:set ts=2 sw=2 et: -- 2.6.4