# Maintainer: Andreas Grapentin # Maintainer (Arch): Sergej Pupykin # Contributor: André Silva # Contributor: jc_gargma # Contributor (Arch): Eschwartz pkgname=icecat-noscript pkgver=5.1.8.2 pkgrel=1 arch=(any) pkgdesc="Extension for icecat which disables script" url="https://noscript.net/" license=(GPL2) depends=(icecat) makedepends=(unzip) groups=(icecat-addons) source=(https://secure.informaction.com/download/releases/noscript-$pkgver.xpi) noextract=("noscript-$pkgver.xpi") sha256sums=('55549d98e5d48134bee85471a69399702ba35dff2e0ef8d81b4d54f02b64bc35') prepare() { unzip -qqo "noscript-$pkgver.xpi" -d "noscript-$pkgver" } package() { _extension_id="$(sed -n '/.*\(.*\)<\/em:id>.*/{s//\1/p;q}' noscript-$pkgver/install.rdf)" _extension_dest="$pkgdir/usr/lib/icecat/browser/extensions/$_extension_id" 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 }