diff options
-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-bus-latest pkgdesc = Floor plans of some Czech bus stations/ stops, to be used with the timetable search engines by CHAPS. pkgver = 2019_07_23 - pkgrel = 1 + pkgrel = 2 epoch = 0 url = http://chaps.cz/eng/download/idos/zip#kotvainf arch = any @@ -13,7 +13,7 @@ pkgbase = idos-timetable-additionalinfo-chaps-bus-latest provides = idos-timetable-additionalinfo-bus=2019_07_23 provides = idos-timetable-additionalinfo-bus-cz=2019_07_23 conflicts = idos-timetable-additionalinfo-chaps-bus - source = c2.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/C2.ZIP + source = c2-2019_07_23.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/C2.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 2023-05-17. +# PKGBUILD last time manually edited: At least on 2023-09-04. +url="http://chaps.cz/eng/download/idos/zip#kotvainf" +_zipfile="C2.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]+' | sed -E -e 's|_([0-9])_|_0\1_|g' -e 's|_([0-9])$|_0\1|g' +} _pkgname=idos-timetable-additionalinfo-chaps-bus pkgname="${_pkgname}-latest" epoch=0 -pkgver=2019_07_23 -pkgrel=1 +_pkgver="$(_pkgver)" # This should be set _before_ sources get downloaded. +pkgver="${_pkgver}" +pkgrel=2 pkgdesc="Floor plans of some Czech bus stations/ stops, to be used with the timetable search engines by CHAPS." arch=('any') -url="http://chaps.cz/eng/download/idos/zip#kotvainf" license=('custom') groups=( @@ -38,10 +45,10 @@ conflicts=( "${_pkgname}" ) -_target="c2.zip" +_target="c2-${_pkgver}.zip" source=( - "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/C2.ZIP" + "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/${_zipfile}" "IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf" "license-dummy.txt" ) @@ -53,9 +60,7 @@ sha256sums=( ) pkgver() { - # date -r "${srcdir}/${_target}" +"%Y_%m_%d" - - wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed 's|^.*File C2.ZIP\(.*\)Zip/C2.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]+' | sed -E -e 's|_([0-9])_|_0\1_|g' -e 's|_([0-9])$|_0\1|g' + printf '%s' "${_pkgver}" } |