diff options
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 19 |
2 files changed, 17 insertions, 7 deletions
@@ -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 @@ -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() { |