[arch-commits] Commit in firefox-noscript/trunk (PKGBUILD)
Sergej Pupykin
spupykin at archlinux.org
Mon Dec 21 19:35:09 UTC 2015
Date: Monday, December 21, 2015 @ 20:35:08
Author: spupykin
Revision: 154066
upgpkg: firefox-noscript 2.7-2
upd
Modified:
firefox-noscript/trunk/PKGBUILD
----------+
PKGBUILD | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-12-21 19:35:05 UTC (rev 154065)
+++ PKGBUILD 2015-12-21 19:35:08 UTC (rev 154066)
@@ -1,25 +1,36 @@
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Eschwartz <eschwartz93 at gmail.com>
pkgname=firefox-noscript
pkgver=2.7
-pkgrel=1
+pkgrel=2
pkgdesc="Extension for firefox which disables script"
arch=('any')
url="http://noscript.net/"
license=('GPL2')
-depends=()
+groups=('firefox-addons')
+depends=('firefox')
makedepends=('unzip')
-source=(https://secure.informaction.com/download/releases/noscript-$pkgver.xpi)
+source=(https://secure.informaction.com/download/releases/noscript-${pkgver}.xpi)
+noextract=("noscript-${pkgver}.xpi")
md5sums=('25fd6771919ae72f525f3b89cfa70b05')
+prepare() {
+ cd "${srcdir}"
+ unzip -qqo "noscript-${pkgver}.xpi" -d "noscript-${pkgver}"
+}
+
package() {
- depends=("firefox")
+ 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/firefox/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/firefox/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
}
More information about the arch-commits
mailing list