summaryrefslogtreecommitdiff
path: root/libre/icecat-noscript
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-27 02:33:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-04-27 02:34:43 -0300
commitf508f171b1ccce02c639f252fa404a7e6f113b31 (patch)
tree488a2debbc13c3986a8c7908855ab1abf8ceacd5 /libre/icecat-noscript
parent7347613261f80bc55835c827fbf2e4dd2fc54ea7 (diff)
ice{cat,weasel}-noscript-2.9.0.11-1: updating version
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
}