summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-11-04 15:32:39 +0100
committerXZS2016-11-04 15:32:39 +0100
commite5c8c29498bfafd6323cc988fd5db5ab9555bed6 (patch)
treea785387ac3647aa10576f7f3ecd240a328689195 /PKGBUILD
parent5d21936503ed0f5e794713ec235403f3f8bbe2f9 (diff)
downloadaur-e5c8c29498bfafd6323cc988fd5db5ab9555bed6.tar.gz
compose download link from meta-data
With the information available from the API JSON, the URL to find the content archive at can be automatically composed, saving a manual modification each update. As the meta data has to be already available for this to happen, the composed link cannot be part of the original download and extraction routine. As prepare is part of this step [1][2], recycling some of makepkg's internal functions in there closely models what would happen if the file was included in the original source array. [1]: https://bugs.archlinux.org/task/42433 [2]: https://git.archlinux.org/pacman.git/commit/?id=c034a3322b2a53fce51ffce144e36361892abeac
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD14
1 files changed, 10 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0a23448814b1..678f0065fd96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,10 +10,8 @@ url='https://www.opendesktop.org/p/1143475'
license=('GPL3')
makedepends=('jq')
optdepends=('gtk-engine-murrine: for GTK2 themes')
-source=("meta::meta://dl.opendesktop.org/api/files/index?format=json&status=active&collection_content_id=${url##*/}"
- 'https://dl.opendesktop.org/api/files/download/id/1468995652/Dark-Aurora.tar.gz')
-sha256sums=('0f20c0287933ea77e0830d856ff75d6e99c80cf3ba185bda5fd6a662bae049b4'
- '6fbdaaae2e59b5f514ca003ba2552fcb7eb5724bd278e291ed5ae2036563d6ff')
+source=("meta::meta://dl.opendesktop.org/api/files/index?format=json&status=active&collection_content_id=${url##*/}")
+sha256sums=('0f20c0287933ea77e0830d856ff75d6e99c80cf3ba185bda5fd6a662bae049b4')
# The following is a very convoluted script because of makepkg's DLAGENTS escaping logic.
# An agent is added for the protocol "meta". It is treated like http, which is done by processing
@@ -31,6 +29,14 @@ meta() {
jq -j ".$1" meta
}
+prepare() {
+ source=("https://dl.opendesktop.org/api/files/download/id/$(meta id)/Dark-Aurora.tar.xz")
+ sha256sums=('6fbdaaae2e59b5f514ca003ba2552fcb7eb5724bd278e291ed5ae2036563d6ff')
+ download_sources
+ check_source_integrity
+ extract_sources
+}
+
pkgver() {
meta version
while read -rd $'\0'