summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Blomstrand2020-10-28 12:33:11 +0100
committerMikael Blomstrand2020-10-28 14:34:08 +0100
commit93a1dd264ea5f596e23051e5ff26170d59728bd2 (patch)
tree054ce134803b87f11a8484313186e99dea40969a
parentc5e1df80c5e654727ec82457b0b296a81d9a242e (diff)
downloadaur-futhark-nightly.tar.gz
pkgver(): fall back on timestamp if not git describe in commit-id
Revert "commit-id now contains output from `git describe`!" This reverts commit c5e1df80c5e654727ec82457b0b296a81d9a242e.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD19
2 files changed, 17 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc85681c0012..841bb4dd3b17 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = futhark-nightly
pkgdesc = A data-parallel functional programming language
- pkgver = 0.15.5.r5.gf59a43a58
+ pkgver = 0.19.0.r1603790886.g0d10f768
pkgrel = 1
url = https://github.com/diku-dk/futhark
arch = x86_64
license = ISC
+ makedepends = curl
depends = ncurses5-compat-libs
depends = zlib
depends = gmp
@@ -13,7 +14,7 @@ pkgbase = futhark-nightly
optdepends = opencl-driver: opencl support
provides = futhark
conflicts = futhark
- source = futhark-nightly-2020042406.tar.xz::https://futhark-lang.org/releases/futhark-nightly-linux-x86_64.tar.xz
+ source = futhark-nightly-1603790886.tar.xz::https://futhark-lang.org/releases/futhark-nightly-linux-x86_64.tar.xz
sha256sums = SKIP
pkgname = futhark-nightly
diff --git a/PKGBUILD b/PKGBUILD
index 19ca9090cd8b..5db2890d46b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Olaf Leidinger <oleid@mescharet.de>
pkgname=futhark-nightly
-pkgver=0.15.5.r5.gf59a43a58
+pkgver=0.19.0.r1603790886.g0d10f768
pkgrel=1
pkgdesc="A data-parallel functional programming language"
arch=('x86_64')
@@ -14,16 +14,25 @@ depends=('ncurses5-compat-libs'
optdepends=('opencl-headers: opencl support'
'ocl-icd: opencl support'
'opencl-driver: opencl support')
-makedepends=()
+makedepends=('curl')
provides=("${pkgname%-nightly}")
conflicts=("${pkgname%-nightly}")
-_timestamp=$(date -u +%Y%m%d%H)
-source=("${pkgname}-${_timestamp}.tar.xz::https://futhark-lang.org/releases/futhark-nightly-linux-${arch}.tar.xz")
+_tarurl="https://futhark-lang.org/releases/futhark-nightly-linux-${arch}.tar.xz"
+_modificationtime=$(date +%s -d "$(curl -sI ${_tarurl} | grep Last-Modified | sed s/^'Last-Modified: '//)")
+source=("${pkgname}-${_modificationtime}.tar.xz::https://futhark-lang.org/releases/futhark-nightly-linux-${arch}.tar.xz")
sha256sums=(SKIP)
pkgver() {
cd "${srcdir}/futhark-nightly-linux-${arch}"
- sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' < commit-id
+
+ if [[ $(cat commit-id) =~ "-g" ]]
+ then
+ # If commit-id contains output from `git describe`
+ sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' < commit-id
+ else
+ # Fallback on modification time and commit-id
+ printf "%s.r%s.g%s" "$(./bin/futhark -V | grep Futhark | sed "s/Futhark //")" "$_modificationtime" "$(cut -c 1-8 < commit-id)"
+ fi
}
package() {