# $Id: PKGBUILD 208501 2017-01-23 11:37:51Z spupykin $ # Maintainer (Arch): Sergej Pupykin # Contributor (Arch): Eschwartz # Maintainer: André Silva # Contributor: jc_gargma pkgname=iceweasel-noscript pkgver=5.0.8.1 pkgrel=1 pkgdesc="Extension for iceweasel which disables script" arch=('any') url="http://noscript.net/" license=('GPL2') groups=('iceweasel-addons') depends=('iceweasel') makedepends=('unzip') replaces=('firefox-noscript') source=(https://secure.informaction.com/download/releases/noscript-${pkgver}.xpi) noextract=("noscript-${pkgver}.xpi") sha512sums=('bc8e6013fdc03aa57734cb17b5d3d67038cce470ed0ffbe0f1d2cac6910451957868a6b185f11183a637943e75aba70a83428c25809f068a4954c209a0888446') whirlpoolsums=('c3b0c97441c9c78fa88adf5178185bbf77dc4d4d68829fcc5a6b0d1e19a0e5cf1d573140fa9d300d8d48d439a5232f619d4dda4807121e5645796f7380dcebc0') prepare() { cd "${srcdir}" unzip -qqo "noscript-${pkgver}.xpi" -d "noscript-${pkgver}" } package() { cd "${srcdir}" _extension_id="$(sed -n '/.*\(.*\)<\/em:id>.*/{s//\1/p;q}' noscript-${pkgver}/install.rdf)" _extension_dest="${pkgdir}/usr/lib/iceweasel/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 }