diff options
author | XZS | 2016-05-12 01:40:49 +0200 |
---|---|---|
committer | XZS | 2016-05-12 02:02:58 +0200 |
commit | 8830cacc9cebb138de435166c34ff44ec3773503 (patch) | |
tree | 2d843b2e829ecc3a7e37f952b3b9a21f26e36166 | |
parent | 8b128275ae2f4af1a1ccfee90a368863e4df67ad (diff) | |
download | aur-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
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 37 insertions, 41 deletions
@@ -1,31 +1,30 @@ -pkgbase = mozilla-extension-gnotifier-git - pkgdesc = Add-on for Firefox and Thunderbird to enable integration with GNOME native notification system. +pkgbase = mozilla-extension-gnotifier + pkgdesc = Add-on for Firefox and Thunderbird. Replaces built-in notifications with the OS native notifications. It pkgver = 1.9.7 pkgrel = 1 - url = https://github.com/mkiol/GNotifier + url = https://addons.mozilla.org/mozilla/addon/gnotifier/ arch = any license = GPL3 - makedepends = nodejs-jpm makedepends = unzip - makedepends = git makedepends = rasqal depends = libnotify - provides = mozilla-extension-gnotifier=1.9.7 - conflicts = mozilla-extension-gnotifier - source = mozilla-extension-gnotifier::git+https://github.com/mkiol/GNotifier + noextract = mozilla-extension-gnotifier.zip + source = mozilla-extension-gnotifier.zip::https://addons.mozilla.org/firefox/downloads/latest/gnotifier/platform:2/ + source = .version::https://services.addons.mozilla.org/firefox/api/1.5/addon/gnotifier + md5sums = 5cb3275123e67b9ca99502d875dc1d01 md5sums = SKIP -pkgname = mozilla-extension-gnotifier-git +pkgname = mozilla-extension-gnotifier -pkgname = firefox-extension-gnotifier-git - depends = mozilla-extension-gnotifier-git=1.9.7 +pkgname = firefox-extension-gnotifier + depends = mozilla-extension-gnotifier=1.9.7 depends = firefox - provides = firefox-extension-gnotifier - conflicts = firefox-extension-gnotifier + provides = + conflicts = -pkgname = thunderbird-extension-gnotifier-git - depends = mozilla-extension-gnotifier-git=1.9.7 +pkgname = thunderbird-extension-gnotifier + depends = mozilla-extension-gnotifier=1.9.7 depends = thunderbird - provides = thunderbird-extension-gnotifier - conflicts = thunderbird-extension-gnotifier + provides = + conflicts = @@ -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()" '{ |