summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-05-12 01:40:23 +0200
committerXZS2016-05-12 01:40:23 +0200
commit9e52e243b4b607ab956d8899bd095ba6735c62be (patch)
treee478244b30d76ec4b40f102e08fa8fccc98eb0e7
parent0875196693daa53999d081b2f862180c0bcd5e49 (diff)
downloadaur-9e52e243b4b607ab956d8899bd095ba6735c62be.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--.SRCINFO17
-rw-r--r--PKGBUILD37
2 files changed, 29 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4eb062c4d44b..dec4b38f45b5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
-pkgbase = firefox-extension-omnisidebar-git
+pkgbase = firefox-extension-omnisidebar
pkgdesc = A firefox add-on designed to provide more control over the behavior of the sidebar.
pkgver = 1.6.12
- pkgrel = 2
- url = https://github.com/Quicksaver/OmniSidebar
+ pkgrel = 1
+ url = https://addons.mozilla.org/firefox/addon/omnisidebar/
arch = any
license = MPLv2
- makedepends = git
+ makedepends = unzip
makedepends = rasqal
depends = firefox
- provides = firefox-extension-omnisidebar=1.6.12
- conflicts = firefox-extension-omnisidebar
- source = firefox-extension-omnisidebar::git+https://github.com/Quicksaver/OmniSidebar
+ noextract = firefox-extension-omnisidebar.zip
+ source = firefox-extension-omnisidebar.zip::https://addons.mozilla.org/firefox/downloads/latest/omnisidebar/platform:2/
+ source = .version::https://services.addons.mozilla.org/firefox/api/1.5/addon/omnisidebar
+ md5sums = f1d3d2d524eae66becd4df650e2fb200
md5sums = SKIP
-pkgname = firefox-extension-omnisidebar-git
+pkgname = firefox-extension-omnisidebar
diff --git a/PKGBUILD b/PKGBUILD
index 23f721b11773..e7e2e654c53d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,25 +2,29 @@
# 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=firefox-extension-omnisidebar-git
+pkgname=firefox-extension-omnisidebar
pkgver=1.6.12
-pkgrel=2
+pkgrel=1
pkgdesc='A firefox add-on designed to provide more control over the behavior of the sidebar.'
-url='https://github.com/Quicksaver/OmniSidebar'
arch=('any')
license=('MPLv2')
depends=('firefox')
+md5sums=('f1d3d2d524eae66becd4df650e2fb200')
-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)
@@ -30,15 +34,14 @@ 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 - .
- echo -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()"
}
version-range() {
local emid=$(emid $1)