summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2015-10-15 01:26:03 +0200
committerXZS2015-10-15 01:26:03 +0200
commit95003e5b2ecedf892ca282f74148bdeb81a971c6 (patch)
treeef64cc999da2c6d0fafe3aa124734a4991a2e24c /PKGBUILD
parent691b3b0c180f5ad174f0e22af9909417d68b36c9 (diff)
downloadaur-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--PKGBUILD18
1 files changed, 12 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cb8711c8ebb3..d6424f1a264b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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%%-*}