summaryrefslogtreecommitdiff
path: root/libre/icecat-noscript
diff options
context:
space:
mode:
Diffstat (limited to 'libre/icecat-noscript')
-rw-r--r--libre/icecat-noscript/PKGBUILD35
1 files changed, 23 insertions, 12 deletions
diff --git a/libre/icecat-noscript/PKGBUILD b/libre/icecat-noscript/PKGBUILD
index be03e0de1..fff1577d3 100644
--- a/libre/icecat-noscript/PKGBUILD
+++ b/libre/icecat-noscript/PKGBUILD
@@ -1,26 +1,37 @@
-# $Id: PKGBUILD 142309 2015-10-01 14:23:50Z spupykin $
+# $Id: PKGBUILD 170778 2016-04-12 16:25:28Z spupykin $
# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor (Arch): Eschwartz <eschwartz93@gmail.com>
# Maintainer: André Silva <emulatorman@parabola.nu>
pkgname=icecat-noscript
-pkgver=2.6.9.37
+pkgver=2.9.0.11
pkgrel=1
pkgdesc="Extension for icecat which disables script"
arch=('any')
url="http://noscript.net/"
license=('GPL2')
-depends=()
+groups=('icecat-addons')
+depends=('icecat')
makedepends=('unzip')
-source=(https://secure.informaction.com/download/releases/noscript-$pkgver.xpi)
-md5sums=('50387f2d528857fe901738c1875fa325')
+source=(https://secure.informaction.com/download/releases/noscript-${pkgver}.xpi)
+noextract=("noscript-${pkgver}.xpi")
+md5sums=('2344f7bab216ee3f552cbf723ad50d7b')
+
+prepare() {
+ cd "${srcdir}"
+ unzip -qqo "noscript-${pkgver}.xpi" -d "noscript-${pkgver}"
+}
package() {
- depends=("icecat")
+ cd "${srcdir}"
- cd $srcdir
- local emid=$(sed -n -e '/<\?em:id>\?/!d; s/.*\([\"{].*[}\"]\).*/\1/; s/\"//g; p; q' install.rdf)
- local dstdir=$pkgdir/usr/lib/icecat/browser/extensions/${emid}
- install -d $dstdir
- cp -R * $dstdir
- rm $dstdir/noscript-$pkgver.xpi
+ _extension_id="$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' noscript-${pkgver}/install.rdf)"
+ _extension_dest="${pkgdir}/usr/lib/icecat/browser/extensions/${_extension_id}"
+ if grep '<em:unpack>true</em:unpack>' 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
}