summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 14 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c81cfcd477dc..010873ca9ae5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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}"
}