summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit user2023-09-04 13:38:20 +0200
committergit user2023-09-04 13:38:20 +0200
commit4a23739c166fe664bb47a24ce7df19a561cf392c (patch)
treeb603d4b3178900424d3e5d9104a3da39a5329835
parent57e8feed08ab83fe5d672e7fed356ba941d4b29d (diff)
downloadaur-4a23739c166fe664bb47a24ce7df19a561cf392c.tar.gz
Switched to version-aware source download target.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD21
2 files changed, 22 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d3684b60a65f..b2fd58978e13 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = idos-timetable-tariff-chaps-trains-cz+sk-latest
pkgdesc = Tariff data for the timetable search engines by CHAPS: Czech ans Slovak trains.
- pkgver = 2021_7_1
- pkgrel = 1
+ pkgver = 2023_8_31
+ pkgrel = 2
epoch = 0
url = http://chaps.cz/eng/download/idos/zip#kotvatar
arch = any
@@ -9,15 +9,15 @@ pkgbase = idos-timetable-tariff-chaps-trains-cz+sk-latest
license = custom
makedepends = wget
depends = idos-timetable-data-trains
- provides = idos-timetable-tariff-chaps-trains-cz+sk=2021_7_1
- provides = idos-timetable-tariff=2021_7_1
- provides = idos-timetable-tariff-trains=2021_7_1
- provides = idos-timetable-tariff-trains-cz=2021_7_1
- provides = idos-timetable-tariff-trains-sk=2021_7_1
+ provides = idos-timetable-tariff-chaps-trains-cz+sk=2023_8_31
+ provides = idos-timetable-tariff=2023_8_31
+ provides = idos-timetable-tariff-trains=2023_8_31
+ provides = idos-timetable-tariff-trains-cz=2023_8_31
+ provides = idos-timetable-tariff-trains-sk=2023_8_31
conflicts = idos-timetable-tariff-chaps-trains-cz+sk
conflicts = idos-timetable-tariff-chaps-all
conflicts = idos-timetable-tariff-trains-cz
- source = vlak_p.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/VLAK_P.ZIP
+ source = vlak_p-2023_8_31.zip::http://ttakt.chaps.cz/TTAktual/Win/Zip/VLAK_P.ZIP
source = IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf
source = license-dummy.txt
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 72a22473f0c9..5d343a484a09 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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#kotvatar"
+_zipfile="VLAK_P.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]+'
+}
_pkgname=idos-timetable-tariff-chaps-trains-cz+sk
pkgname="${_pkgname}-latest"
epoch=0
-pkgver=2021_7_1
-pkgrel=1
+_pkgver="$(_pkgver)" # This should be set _before_ sources get downloaded.
+pkgver="${_pkgver}"
+pkgrel=2
pkgdesc="Tariff data for the timetable search engines by CHAPS: Czech ans Slovak trains."
arch=(any)
-url="http://chaps.cz/eng/download/idos/zip#kotvatar"
license=('custom')
groups=(
@@ -42,10 +49,10 @@ conflicts=(
"idos-timetable-tariff-trains-cz"
)
-_target='vlak_p.zip'
+_target="vlak_p-${_pkgver}.zip"
source=(
- "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/VLAK_P.ZIP"
+ "${_target}::http://ttakt.chaps.cz/TTAktual/Win/Zip/${_zipfile}"
"IDOS-Licence.pdf::http://chaps.cz/files/idos/IDOS-Licence.pdf"
"license-dummy.txt"
)
@@ -57,7 +64,7 @@ sha256sums=(
)
pkgver() {
- wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed 's|^.*File VLAK_P.ZIP\(.*\)Zip/VLAK_P.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}"
}