diff options
author | git user | 2023-09-04 13:49:30 +0200 |
---|---|---|
committer | git user | 2023-09-04 13:49:30 +0200 |
commit | c4ef196c8da1bacb0390644102c21bda333451ea (patch) | |
tree | b4ae0d814df02975ed544a304da2bf7dc38316f9 | |
parent | 711154ceba88fa7ff1bea2b7815d31dc4e0d6398 (diff) | |
download | aur-c4ef196c8da1bacb0390644102c21bda333451ea.tar.gz |
Switched to version-aware source download target.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 25 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = idos-timetable-data-chaps-trains-pid-2023-latest pkgdesc = 2022/2023 Timetable data for the timetable search engines by CHAPS: Trains in Praha public transport reagion (PID). - pkgver = 2023_05_19 - pkgrel = 1 + pkgver = 2023_09_01 + pkgrel = 2 epoch = 0 url = http://chaps.cz/eng/download/idos/zip#kotvatt arch = any @@ -12,16 +12,16 @@ pkgbase = idos-timetable-data-chaps-trains-pid-2023-latest optdepends = idos-timetable-tariff-mhd-pid: For showing prices. optdepends = idos-timetable-maps-mhd-pid: For displaying routes on maps. optdepends = idos-timetable-additionalinfo-mhd-pid: For additional information (photographs of some stops). - provides = idos-timetable-data-chaps-trains-pid-2023=2023_05_19 - provides = idos-timetable-data=2023_05_19 - provides = idos-timetable-data-trains=2023_05_19 - provides = idos-timetable-data-trains-pid=2023_05_19 - provides = idos-timetable-data-trains-pid-2023=2023_05_19 + provides = idos-timetable-data-chaps-trains-pid-2023=2023_09_01 + provides = idos-timetable-data=2023_09_01 + provides = idos-timetable-data-trains=2023_09_01 + provides = idos-timetable-data-trains-pid=2023_09_01 + provides = idos-timetable-data-trains-pid-2023=2023_09_01 conflicts = idos-timetable-data-chaps-trains-pid-2023 conflicts = idos-timetable-data-trains-pid replaces = idos-timetable-data-chaps-trains-pid-latest - replaces = idos-timetable-data-chaps-trains-pid-2023<=2023_05_19 - source = vlakpid23.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/VLAKPID23.ZIP + replaces = idos-timetable-data-chaps-trains-pid-2023<=2023_09_01 + source = vlakpid23-2023_09_01.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/VLAKPID23.ZIP source = IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf source = license-dummy.txt sha256sums = SKIP @@ -1,18 +1,28 @@ # Maintainer: dreieck -# PKGBUILD last time manually edited: At least on 2023-05-17. +# PKGBUILD last time manually edited: At least on 2023-09-04. _year='23' _prevyear="$(( ${_year} - 1 ))" +url="http://chaps.cz/eng/download/idos/zip#kotvatt" +_zipfile="VLAKPID${_year}.ZIP" +_pkgver() { + # Reason for a _pkgver(): Have something to run before source download so that we can have version aware source downloads. + # Do not use metadata of the source file, but do website parsing: So we do not need to download the file to (AUR-)update the package version with our own crude hacked script 'idos-aur-update-versions.sh'. + #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-data-chaps-trains-pid-20${_year}" pkgname="${_pkgname}-latest" epoch=0 -pkgver=2023_05_19 -pkgrel=1 +_pkgver="$(_pkgver)" # This should be set _before_ sources get downloaded. +pkgver="${_pkgver}" +pkgrel=2 pkgdesc="20${_prevyear}/20${_year} Timetable data for the timetable search engines by CHAPS: Trains in Praha public transport reagion (PID)." arch=(any) -url="http://chaps.cz/eng/download/idos/zip#kotvatt" license=('custom') groups=( @@ -55,8 +65,7 @@ conflicts=( # "idos-timetable-data-chaps-all" ) -_zipfile="VLAKPID${_year}.ZIP" -_target="vlakpid${_year}.zip" +_target="vlakpid${_year}-${_pkgver}.zip" source=( "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/${_zipfile}" @@ -71,10 +80,7 @@ sha256sums=( ) pkgver() { - # Do not use metadata of the source file, but do website parsing: So we do not need to download the file to (AUR-)update the package version with our own crude hacked script 'idos-aur-update-versions.sh'. - #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' + printf '%s' "${_pkgver}" } |