diff options
author | git user | 2023-09-04 14:23:35 +0200 |
---|---|---|
committer | git user | 2023-09-04 14:23:35 +0200 |
commit | 051f3d4ce4f716d66d912d82927718daa7c6b380 (patch) | |
tree | 56d852e063c2af6b2344f55609fa297d607d6b29 | |
parent | 5da4c589cfb6ba18e7870a457606904789f83633 (diff) | |
download | aur-051f3d4ce4f716d66d912d82927718daa7c6b380.tar.gz |
Switched to version-aware source download target.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 23 |
2 files changed, 16 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = idos-timetable-additionalinfo-chaps-mhd-idsjmk-latest pkgdesc = Photographs of some stops within the IDSJMK (Brno region) public transport area, to be used with the timetable search engines by CHAPS. pkgver = 2016_5_24 - pkgrel = 8 + pkgrel = 9 epoch = 0 url = http://chaps.cz/eng/download/idos/zip#kotvainf arch = any @@ -12,7 +12,7 @@ pkgbase = idos-timetable-additionalinfo-chaps-mhd-idsjmk-latest provides = idos-timetable-additionalinfo-chaps-mhd-idsjmk=2016_5_24 provides = idos-timetable-additionalinfo-mhd-idsjmk=2016_5_24 conflicts = idos-timetable-additionalinfo-chaps-mhd-idsjmk - source = cidsjmk.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/CIDSJMK.ZIP + source = cidsjmk-2016_5_24.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/CIDSJMK.ZIP source = IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf source = license-dummy.txt sha256sums = SKIP @@ -1,15 +1,22 @@ # Maintainer: dreieck -# PKGBUILD last time manually edited: At least on 2021-07-04. +# PKGBUILD last time manually edited: At least on 2023-09-04. +url="http://chaps.cz/eng/download/idos/zip#kotvainf" +_zipfile="CIDSJMK.ZIP" +_pkgver() { + # Reason for a _pkgver(): Have something to run before source download so that we can have version aware source downloads. + # date -r "${srcdir}/${_target}" +"%Y_%m_%d" + wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed 's|^.*File '"${_zipfile}"'\(.*\)Zip/'"${_zipfile}"'.*$|\1\n|g' | tr '\a' '\n' | grep 'Update date:' | cut -d, -f1 | sed -r 's|([0-9]+)\.([0-9]+)\.([0-9]+).|\n\3_\2_\1\n|g' | grep -E '^[0-9]+_[0-9]+_[0-9]+' +} _pkgname=idos-timetable-additionalinfo-chaps-mhd-idsjmk pkgname="${_pkgname}-latest" epoch=0 -pkgver=2016_5_24 -pkgrel=8 +_pkgver="$(_pkgver)" # This should be set _before_ sources get downloaded. +pkgver="${_pkgver}" +pkgrel=9 pkgdesc="Photographs of some stops within the IDSJMK (Brno region) public transport area, to be used with the timetable search engines by CHAPS." arch=('any') -url="http://chaps.cz/eng/download/idos/zip#kotvainf" license=('custom') groups=( @@ -36,10 +43,10 @@ conflicts=( "${_pkgname}" ) -_target="cidsjmk.zip" +_target="cidsjmk-${_pkgver}.zip" source=( - "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/CIDSJMK.ZIP" + "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/${_zipfile}" "IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf" "license-dummy.txt" ) @@ -51,9 +58,7 @@ sha256sums=( ) pkgver() { - # date -r "${srcdir}/${_target}" +"%Y_%m_%d" - - wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed 's|^.*File CIDSJMK.ZIP\(.*\)Zip/CIDSJMK.ZIP.*$|\1\n|g' | tr '\a' '\n' | grep 'Update date:' | cut -d, -f1 | sed -r 's|([0-9]+)\.([0-9]+)\.([0-9]+).|\n\3_\2_\1\n|g' | grep -E '^[0-9]+_[0-9]+_[0-9]+' + printf '%s' "${_pkgver}" } |