diff options
author | XZS | 2015-10-15 01:26:03 +0200 |
---|---|---|
committer | XZS | 2015-10-15 01:26:03 +0200 |
commit | 95003e5b2ecedf892ca282f74148bdeb81a971c6 (patch) | |
tree | ef64cc999da2c6d0fafe3aa124734a4991a2e24c /PKGBUILD | |
parent | 691b3b0c180f5ad174f0e22af9909417d68b36c9 (diff) | |
download | aur-95003e5b2ecedf892ca282f74148bdeb81a971c6.tar.gz |
externalize compatible version query
This makes it easier to switch out the location this information is
retrieved from, should there be a more current source to query than the
install.rdf file included in the Add-On itself.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -30,6 +30,18 @@ prepare() { find -name '.git*' -exec rm -rf '{}' + } +makedepends+=(rasqal) + +sparql() { + roqet -e "PREFIX em: <http://www.mozilla.org/2004/em-rdf#> SELECT ?x WHERE { $1 }" \ + -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() { cd "$_gitname" sed -n 's/.*"version"\s*:\s*"\([[:digit:].]*\)"\s*,.*/\1/p' \ @@ -41,12 +53,6 @@ build() { ./make-xpi.py } -makedepends+=(rasqal) - -sparql() { - roqet -e "PREFIX em: <http://www.mozilla.org/2004/em-rdf#> SELECT ?x WHERE { $1 }" \ - -D "${2:-install.rdf}" -r csv 2>/dev/null | tr -d '\r' | tail -n 1 | head -c -1 -} prepare_target() { local target=${pkgname%%-*} |