diff options
Diffstat (limited to 'libre')
-rw-r--r-- | libre/icecat-noscript/PKGBUILD | 35 | ||||
-rw-r--r-- | libre/iceweasel-noscript/PKGBUILD | 35 |
2 files changed, 46 insertions, 24 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 } diff --git a/libre/iceweasel-noscript/PKGBUILD b/libre/iceweasel-noscript/PKGBUILD index f439334b2..939c41812 100644 --- a/libre/iceweasel-noscript/PKGBUILD +++ b/libre/iceweasel-noscript/PKGBUILD @@ -1,27 +1,38 @@ -# $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=iceweasel-noscript -pkgver=2.6.9.37 +pkgver=2.9.0.11 pkgrel=1 pkgdesc="Extension for iceweasel which disables script" arch=('any') url="http://noscript.net/" license=('GPL2') -depends=() +groups=('iceweasel-addons') +depends=('iceweasel') makedepends=('unzip') replaces=('firefox-noscript') -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=("iceweasel") + 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/iceweasel/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/iceweasel/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 } |