# $Id: PKGBUILD 208501 2017-01-23 11:37:51Z spupykin $ # Maintainer (Arch): Sergej Pupykin # Contributor (Arch): Eschwartz # Maintainer: André Silva # Contributor: jc_gargma pkgname=icecat-noscript pkgver=5.0.7.1 pkgrel=1 pkgdesc="Extension for icecat which disables script" arch=('any') url="https://noscript.net/" license=('GPL2') groups=('icecat-addons') depends=('icecat') makedepends=('unzip') source=(https://secure.informaction.com/download/releases/noscript-${pkgver}.xpi) noextract=("noscript-${pkgver}.xpi") sha512sums=('d518cc9f56d3cbc0bad4dcfd15465f0879dfa1535ecb2162b9204c1ef6fb624586ad7ed29ba6c3b073dd7d91bfe06f0f000d4c5c13f1e30fc15034ddf9c043a3') whirlpoolsums=('3c2e524edf24cfab0a0fd6f065475b8b23c2678b2d2214e745bc9ee151f8e3cdbbbcf8bea8384a93036b1b66d74d0cbb29b6c8176dff9d3dd3472b15cdf496de') 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/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 }