# Maintainer: Andreas Grapentin # Maintainer (Arch): Sergej Pupykin # Contributor: André Silva # Contributor: jc_gargma # Contributor (Arch): Eschwartz pkgname=iceweasel-noscript pkgver=10.1.6.2 pkgrel=1 arch=(any) pkgdesc="Extension for iceweasel which disables script" url="https://noscript.net/" license=(GPL) depends=(iceweasel) makedepends=(unzip) replaces=(firefox-noscript) groups=(iceweasel-addons) source=(https://secure.informaction.com/download/releases/noscript-$pkgver.xpi) noextract=("noscript-$pkgver.xpi") sha256sums=('657d8ebff32415adb1a2d72cd0f7db5dabe8a32900d7c2f911a840548d31d37b') prepare() { unzip -qqo "noscript-$pkgver.xpi" -d "noscript-$pkgver" } package() { _extension_id="$(sed -n '/.*"id": *"\(.*\)".*/{s//\1/p;q}' noscript-$pkgver/manifest.json)" _extension_dest="$pkgdir/usr/lib/iceweasel/browser/extensions/$_extension_id" # _extension_id must not be empty [ -n "$_extension_id" ] || (echo "error extracting extension_id" >&2 && exit 1) if grep 'true' noscript-$pkgver/install.rdf > /dev/null; then install -dm755 "$_extension_dest" cp -R noscript-$pkgver/* "$_extension_dest" chmod -R ugo+rX "$_extension_dest" else install -Dm644 noscript-$pkgver.xpi "$_extension_dest.xpi" fi }