summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD22
2 files changed, 20 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 66173bd9554c..6d651bbc089d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,9 +6,9 @@ pkgbase = aurora-themes
arch = any
license = GPL3
optdepends = gtk-engine-murrine: for GTK2 themes
- source = version.html::http://opendesktop.org/content/show.php?content=170523
+ source = version::version://opendesktop.org/content/show.php?content=170523
source = http://gnome-look.org/CONTENT/content-files/170523-Dark-Aurora.tar.gz
- sha256sums = 68991e89036a271fec7f8b6408416a6c2817f298ef326365117fe41b1b5222b5
+ sha256sums = 6f34484abaf76f7175264de32610a92447408d63c06a91dfb6e5744023e8d831
sha256sums = 506332ec0d86b90f0e41be79875fa7b40bb923caf01c1412cf02020a6d056f28
pkgname = aurora-themes
diff --git a/PKGBUILD b/PKGBUILD
index ae3b9c1cf78f..d971ea2a62ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,14 +9,28 @@ arch=('any')
url="http://opendesktop.org/content/show.php?content=170523"
license=('GPL3')
optdepends=("gtk-engine-murrine: for GTK2 themes")
-source=("version.html::$url"
+source=("version::version${url#http}"
"http://gnome-look.org/CONTENT/content-files/${url##*=}-Dark-Aurora.tar.gz")
-sha256sums=('68991e89036a271fec7f8b6408416a6c2817f298ef326365117fe41b1b5222b5'
+sha256sums=('6f34484abaf76f7175264de32610a92447408d63c06a91dfb6e5744023e8d831'
'506332ec0d86b90f0e41be79875fa7b40bb923caf01c1412cf02020a6d056f28')
+# The following is very convoluted script because of makepkg's DLAGENTS escaping logic.
+# An agent is added for the protocol "version". It is treated like http, which is done by processing
+# the input url %u with sed, replacing the protocol back to http. Everything downloaded is then not
+# immediatley saved to the output file name %o, but first piped through sed, which finds the
+# gnome-shell version string in the Dark Aurora page on GNOME-Look.org.
+# This makes a file containing the version readily available to both pkgver and package so that they
+# not both have to sed out the version from the webpage themselves.
+DLAGENTS=("version::/usr/bin/bash -c $(
+ printf '%s\n' "${DLAGENTS[@]}" | sed -n 's/http::\(.*\)/\1/p' \
+ | sed 's/-[^ ] %o //' | sed 's/ /\\ /g' | sed 's/%u/$(echo\\ %u\\ |\\ sed\\ "s\/^version\/http\/")/'
+)\ |\ sed\ -n\ 's/$(
+ ).*<h1.*>Dark\ Aurora<\\\\/h1>.*<span\ class=\"contentdata\">$(
+ )\\\\([^<]\\\\+\\\\)<\\\\/span>.*/\\\\1/p'\ >\ %o"
+"${DLAGENTS[@]}")
+
pkgver() {
- sed -n 's/.*<h1.*>Dark Aurora<\/h1>.*<span class="contentdata">\([^<]\+\)<\/span>.*/\1/p' \
- version.html | tr '\n' '.'
+ tr '\n' '.' < version
while read -rd $'\0'
do
if [[ "$REPLY" -gt "$max" ]]