summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-05-12 01:40:49 +0200
committerXZS2016-05-12 02:02:58 +0200
commit8830cacc9cebb138de435166c34ff44ec3773503 (patch)
tree2d843b2e829ecc3a7e37f952b3b9a21f26e36166 /PKGBUILD
parent8b128275ae2f4af1a1ccfee90a368863e4df67ad (diff)
downloadaur-8830cacc9cebb138de435166c34ff44ec3773503.tar.gz
provide stable variant
Mozilla plans to disallow the installation of unsigned extensions without override from coming version 47 on. [1] Signed variants can usually only be retrieved from addons.mozilla.org. So the new package ensures that users of unmodified Firefox can continue to use the respective Add-Ons in the future. [1]: https://wiki.mozilla.org/Add-ons/Extension_Signing
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 21 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f0093614d698..7e20eb0a3744 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,27 +2,30 @@
# This PKGBUILD is maintained on GitHub <https://github.com/dffischer/mozilla-extensions>.
# You may find it convenient to file issues and pull requests there.
-pkgname=mozilla-extension-gnotifier-git
+pkgname=mozilla-extension-gnotifier
pkgver=1.9.7
pkgrel=1
-pkgdesc='Add-on for Firefox and Thunderbird to enable integration with GNOME native notification system.'
-url='https://github.com/mkiol/GNotifier'
+pkgdesc='Add-on for Firefox and Thunderbird. Replaces built-in notifications with the OS native notifications. It'
arch=('any')
license=('GPL3')
depends=('libnotify')
-makedepends=('nodejs-jpm' 'unzip')
optdepends=(firefox thunderbird)
+md5sums=('5cb3275123e67b9ca99502d875dc1d01')
-makedepends+=('git')
-source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}")
+[ "$arch" ] || arch=('any')
+
+source+=(
+ "${pkgname}.zip::https://addons.mozilla.org/firefox/downloads/latest/${_extname=${pkgname#*-*-}}/platform:2/"
+ ".version::https://services.addons.mozilla.org/firefox/api/1.5/addon/$_extname"
+)
+[ ${url++} ] || url="https://addons.mozilla.org/${pkgname%%-*}/addon/$_extname/"
md5sums+=('SKIP')
-provides+=("$_gitname=$pkgver")
-conflicts+=("$_gitname")
+noextract+=("${pkgname}.zip")
+makedepends+=(unzip)
-# Move down repository content for easier access by following functions.
prepare() {
- cp -rfT --reflink=auto "$_gitname" .
- rm -rf "$_gitname"
+ unzip "${pkgname}.zip"
+ rm ${pkgname}.zip
}
makedepends+=(rasqal)
@@ -32,24 +35,18 @@ sparql() {
-D "${2:-install.rdf}" -r csv 2>/dev/null | tr -d '\r' | tail -n 1 | head -c -1
}
-# Retrieve current compatibility information from install.rdf.
-query-version() {
- sparql "[] em:id '$2' ; em:${1}Version ?x" install.rdf
+pkgver() {
+ sparql '<urn:mozilla:install-manifest> em:version ?x' | tr - .
}
-pkgver() {
- find -iname '*.json' -exec sed -n \
- 's/.*"version"\s*:\s*"\([[:digit:].]*\)"\s*,.*/\1/p' \
- '{}' \; -quit 2>/dev/null | tr '\n' '.'
-printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+# Retrieve current compatibility information from addons.mozilla.org API.
+query-version() {
+ xmllint .version --xpath \
+ "//application[appID='$2']/$1_version/text()"
}
build() {
- cp -r --reflink=auto source/* .
- rm -r xpi misc *.md win8* source resources lib/{windows,osx}.js
- jpm xpi
- unzip -o *.xpi
- rm *.xpi
+ rm -r resources lib/{windows,osx}.js
}
eval "package_$pkgname()" '{