diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -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#kotvamap" +_zipfile="KOMPLET_M.ZIP" +_pkgver() { + # Reason for a _pkgver(): Have something to run before source download so that we can have version aware source downloads. + 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-maps-chaps-all pkgname="${_pkgname}-latest" epoch=0 -pkgver=2023_05_09 -pkgrel=1 +_pkgver="$(_pkgver)" # This should be set _before_ sources get downloaded. +pkgver="${_pkgver}" +pkgrel=2 pkgdesc="Map data for the timetable search engines by CHAPS: European railway, Czech/Slovak trains + bus, Czech public transport. Note that some timetables need the purchased version of IDOS to run." arch=(any) -url="http://chaps.cz/eng/download/idos/zip#kotvamap" license=('custom') groups=( @@ -70,10 +77,10 @@ conflicts=( "idos-timetable-maps-mhd-zlin" ) -_target='komplet_m.zip' +_target="komplet_m-${_pkgver}.zip" source=( - "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/KOMPLET_M.ZIP" + "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/${_zipfile}" "IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf" "license-dummy.txt" ) @@ -85,7 +92,7 @@ sha256sums=( ) pkgver() { - wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed 's|^.*File KOMPLET_M.ZIP\(.*\)Zip/KOMPLET_M.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}" } |