summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCharlie Wolf2019-04-09 14:50:18 -0700
committerCharlie Wolf2019-04-09 14:50:18 -0700
commita78857b701e0fc18322547237ff5f9f5470ccc8e (patch)
tree7870dac10b69cce31db3a32894b8bf8142ce181f /PKGBUILD
parent8e0c036524c70f1c363f101d57c4a965e6a2477d (diff)
downloadaur-firefox-extension-leechblock.tar.gz
Update
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 12 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 452b3301925..890ed5f2c92 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,24 @@
+# Maintainer: Charlie Wolf <charlie@wolf.is>
+
pkgname=firefox-extension-leechblock
pkgdesc="LeechBlock is a simple free productivity tool designed to block those time-wasting sites that can suck the life out of your working day."
-pkgver=1.0.8
+pkgver=0.9.10.1
pkgrel=1
arch=('any')
-url="https://addons.mozilla.org/en-US/firefox/addon/leechblock/"
-makedepends=('unzip' )
+url="https://addons.mozilla.org/en-US/firefox/addon/leechblock-ng/"
+makedepends=('unzip' 'raptor')
depends=("firefox")
license=('MIT')
-source=("${pkgname}.xpi::https://addons.mozilla.org/firefox/downloads/latest/leechblock/addon-4476-latest.xpi" )
-sha512sums=('00d5c6246b31f25ad319338bfd1f4f099a9178eba8fdbd99bc1ea80eedb240464bb8b14d04dc943838f54e99c03ffb8981f60ecb2589628b76a9cf3caa111ef2')
+source=("${pkgname}.xpi::https://addons.mozilla.org/firefox/downloads/latest/leechblock-ng/addon-1728895-latest.xpi" )
+sha512sums=('dcdb61483fb173dc41fc50636d42dc29986c2023d09d6663acd61ac2eca33484c31976471de285e748c4b1eb51402c0342470c0b59de9df25dafb04fdc225c0f')
noextract=("${pkgname}.xpi")
+pkgver(){
+ unzip -p ${pkgname}.xpi manifest.json | jq -r .version
+}
+
package(){
srcxpi="${srcdir}/${pkgname}.xpi"
- emid=$(unzip -p "$srcxpi" install.rdf | sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}')
+ emid=$(unzip -p $srcxpi META-INF/mozilla.rsa | openssl pkcs7 -inform DER -noout -print_certs|grep "O = Addons"|perl -pe '/CN\s*=\s*([^\s]+)/g;$_=$1')
install -Dm644 "$srcxpi" "${pkgdir}/usr/lib/firefox/browser/extensions/$emid.xpi"
}