makedeb
Selectively disable javascript on Firefox.
Click here to go back to the commit logs for webext-noscript-security-suite-firefox.
Hash: 20b4edbc6dd9a446c02cd4ab02d092cc9b2916c7
Message: 11.4.29, refactoring and compressed version
diff --git a/.SRCINFO b/.SRCINFO
index 7ec081c..81c2ae1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,15 +3,17 @@ pkgname = webext-noscript-security-suite-firefox
pkgbase = webext-noscript-security-suite-firefox
pkgdesc = Selectively disable javascript on Firefox.
pkgrel = 0
-pkgver = 11.4.28
+pkgver = 11.4.29
url = https://addons.mozilla.org/en-US/firefox/addon/noscript/
arch = all
license = GPL2
-makedepends = unzip
-noextract = noscript-11.4.28.xpi
+noextract = noscript-11.4.29.xpi
optdepends = firefox
+optdepends = firefox-esr
options = !strip
-source = https://addons.mozilla.org/firefox/downloads/file/4178438/noscript-11.4.28.xpi
-b2sums = 2f51c814ffa95d9f22fddee30064eecc178797cc9d637ccde1dab49bcb71fd5d30dea46a05812b079ba0ce1e2e7c65b99991b315467a488f435b770550bb7bdc
-makedepends = unzip
+source = https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
+b2sums = 409947675258d95961b6c4368cc449fd81c6281e4b2bb73e916fd1cc53a26f2681085f500510dffa75774e921da2d8cc9e255e13071933a8369fed427982daee
optdepends = firefox
+optdepends = firefox-esr
+optmakedepends = unzip: to uncompress the webextention
+optmakedepends = unzip: to uncompress the webextention
diff --git a/PKGBUILD b/PKGBUILD
index 952af80..623b310 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,39 @@
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
+# If your Firefox version doesn't support extracted webextentions
+#_UNCOMPRESS=0
pkgname=webext-noscript-security-suite-firefox
-pkgver=11.4.28
+_download_name="noscript"
+pkgver=11.4.29
+_fileid=('4206186')
pkgrel=0
pkgdesc='Selectively disable javascript on Firefox.'
arch=('all')
url='https://addons.mozilla.org/en-US/firefox/addon/noscript/'
license=('GPL2')
-makedepends=("unzip")
-optdepends=('firefox')
-_fileid=('4178438')
+optmakedepends=("unzip: to uncompress the webextention")
+optdepends=('firefox' 'firefox-esr')
source=("https://addons.mozilla.org/firefox/downloads/file/$_fileid/noscript-${pkgver}.xpi")
-noextract=("noscript-${pkgver}.xpi")
+noextract=("${_download_name}-${pkgver}.xpi")
options=('!strip')
-b2sums=('2f51c814ffa95d9f22fddee30064eecc178797cc9d637ccde1dab49bcb71fd5d30dea46a05812b079ba0ce1e2e7c65b99991b315467a488f435b770550bb7bdc')
+b2sums=('409947675258d95961b6c4368cc449fd81c6281e4b2bb73e916fd1cc53a26f2681085f500510dffa75774e921da2d8cc9e255e13071933a8369fed427982daee')
+
+prepare() {
+ [ -z "$_UNCOMPRESS" ] && unzip -u "$_download_name-${pkgver}.xpi" -d "${srcdir}/$pkgname-${pkgver}" || :
+}
package() {
_mozilla_id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
- _download_name="noscript"
_ext_id="{73a6fe31-595d-460b-a920-fcc0f8843232}"
_license_path="/usr/share/common-licenses/GPL-2"
+
install -dm755 "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id"
- unzip "$_download_name-${pkgver}.xpi" -d "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id/$_ext_id"
+ if [ -z "$_UNCOMPRESS" ];
+ then
+ mv "${srcdir}/$pkgname-${pkgver}" "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id/$_ext_id"
+ else
+ install -Dm644 "$_download_name-${pkgver}.xpi" "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id/$_ext_id.xpi"
+ fi
+ # Doc
install -dm755 "${pkgdir}/usr/share/doc/$pkgname"
ln -s "$_license_path" "${pkgdir}/usr/share/doc/$pkgname/"
}