diff options
author | felics | 2019-08-29 17:07:00 +0200 |
---|---|---|
committer | felics | 2019-08-29 17:07:00 +0200 |
commit | 931755ea88dd2715438cd989a76e210d2f36d1bf (patch) | |
tree | cabd1fe7761e88d0e61e8ce1ceacbdcc9261db5a | |
parent | bfe13384c53fe84a352010a997437ee5c33c488c (diff) | |
download | aur-931755ea88dd2715438cd989a76e210d2f36d1bf.tar.gz |
Changed to new upstream source scheme.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 53 |
2 files changed, 41 insertions, 36 deletions
@@ -1,9 +1,9 @@ pkgbase = idos-timetable-data-zsr-europe+sk-2019-latest pkgdesc = 2018/2019 Timetable data for the offline railway and other public transport timetable search engines by CHAPS: European and Slovak train data, provided by Inprop (Slovakia). - pkgver = 2019_5_30 + pkgver = 2019_8_27 pkgrel = 1 epoch = 1 - url = http://www.inprop.sk/download.aspx + url = https://www.inprop.eu/Home/Downloads arch = any groups = idos-timetable license = custom @@ -12,21 +12,21 @@ pkgbase = idos-timetable-data-zsr-europe+sk-2019-latest depends = idos-timetable-data-trains-common optdepends = idos-timetable-tariff-trains-europe: For showing prices. optdepends = idos-timetable-tariff-trains-cz: For showing prices (Czech republic only). - optdepends = idos-timetable-tariff-trains-sk: For showing prices (Slovakia republic only). + optdepends = idos-timetable-tariff-trains-sk: For showing prices (Slovakia only). optdepends = idos-timetable-maps-trains-europe: For displaying routes. optdepends = idos-timetable-maps-trains-cz: For displaying routes (Czech republic only). optdepends = idos-timetable-maps-trains-sk: For displaying routes (Slovakia only). - provides = idos-timetable-data-zsr-europe+sk-2019=2019_5_30 - provides = idos-timetable-data=2019_5_30 - provides = idos-timetable-data-trains=2019_5_30 - provides = idos-timetable-data-trains-sk=2019_5_30 - provides = idos-timetable-data-trains-sk-2019=2019_5_30 - provides = idos-timetable-data-trains-europe=2019_5_30 - provides = idos-timetable-data-trains-europe-2019=2019_5_30 + provides = idos-timetable-data-zsr-europe+sk-2019=2019_8_27 + provides = idos-timetable-data=2019_8_27 + provides = idos-timetable-data-trains=2019_8_27 + provides = idos-timetable-data-trains-sk=2019_8_27 + provides = idos-timetable-data-trains-sk-2019=2019_8_27 + provides = idos-timetable-data-trains-europe=2019_8_27 + provides = idos-timetable-data-trains-europe-2019=2019_8_27 conflicts = idos-timetable-data-zsr-europe+sk-2019 replaces = idos-timetable-data-zsr-europe+sk-latest - replaces = idos-timetable-data-zsr-europe+sk-2019<=2019_5_30 - source = vlak19e_sk.exe::http://www.inprop.sk/Data/Vlak19E_Sk.exe + replaces = idos-timetable-data-zsr-europe+sk-2019<=2019_8_27 + source = 12.exe::https://www.inprop.eu/Home/DownloadFile/12 source = license-dummy.txt sha256sums = SKIP sha256sums = 14279a732be7d04304ff3860d54e0cf8c1a8ba0a46343eaf9b7ce3a105815946 @@ -8,11 +8,11 @@ _prevyear="$(( ${_year} - 1 ))" _pkgname="idos-timetable-data-zsr-europe+sk-20${_year}" pkgname="${_pkgname}-latest" epoch=1 -pkgver=2019_5_30 +pkgver=2019_8_27 pkgrel=1 pkgdesc="20${_prevyear}/20${_year} Timetable data for the offline railway and other public transport timetable search engines by CHAPS: European and Slovak train data, provided by Inprop (Slovakia)." arch=(any) -url="http://www.inprop.sk/download.aspx" +url="https://www.inprop.eu/Home/Downloads" license=('custom') groups=( @@ -31,7 +31,7 @@ makedepends=( optdepends=( "idos-timetable-tariff-trains-europe: For showing prices." "idos-timetable-tariff-trains-cz: For showing prices (Czech republic only)." - "idos-timetable-tariff-trains-sk: For showing prices (Slovakia republic only)." + "idos-timetable-tariff-trains-sk: For showing prices (Slovakia only)." "idos-timetable-maps-trains-europe: For displaying routes." "idos-timetable-maps-trains-cz: For displaying routes (Czech republic only)." "idos-timetable-maps-trains-sk: For displaying routes (Slovakia only)." @@ -58,47 +58,52 @@ conflicts=( "${_pkgname}" ) -_get_download_url() { - echo "http://www.inprop.sk/Data/Vlak${_year}E_Sk.exe" +_list_sources() { + wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed -E -e 's|<tr>|\n|g' -e 's|</tr>|\n|g' | grep -E '<span.*>Vlaky Európa 2019' | sed 's|^.*href="/Home/\(DownloadFile/[^"]*\)".*$|\1|g' | head -n1 | while read _line; do + echo "$(basename "${_line}").exe::$(dirname "${url}")/${_line}" + done } -_source0="$(_get_download_url)" -_target0="vlak${_year}e_sk.exe" +_sources=($(_list_sources)) source=( - "${_target0}::${_source0}" + "${_sources[@]}" "license-dummy.txt" ) +sha256sums=() + +for i in $(seq 1 ${#_sources[@]}); do + sha256sums+=('SKIP') +done + sha256sums=( - 'SKIP' + "${sha256sums[@]}" "14279a732be7d04304ff3860d54e0cf8c1a8ba0a46343eaf9b7ce3a105815946" ) 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}/${_target0}" +"%Y_%m_%d" - - _ver="$(wget -nv -O- "${url}" | grep --text -E "Data/Vlak${_year}E_Sk\.exe" | sed -r 's|[^0-9]([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{4})[^0-9]|\n\1\n|' | grep --text -E '^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{4}$' | awk -F. '{print $3"_"$2"_"$1}')" - - echo "${_ver}" + # Use the version of the newest updated file. + wget -nv -O- "${url}" | tr -d '\a' | tr '\n' '\a' | sed -E -e 's|<tr>|\n|g' -e 's|</tr>|\n|g' | grep -E '<span.*>Vlaky Európa 2019' | sed -E 's|^.*Updated:.*<span>([0-9]+/[0-9]+/[0-9]+).*$|\1|g' | awk -F/ '{print $3"_"$1"_"$2}' | sort -Vr | head -n1 } +prepare() { + cd "${srcdir}" + for _file in *.exe; do + 7z x "${_file}" + done +} package() { _instdirbase='/opt/idos-timetable' _instdir="${pkgdir}/${_instdirbase}" - install -d -m755 "${_instdir}" + install -d -m755 "${_instdir}/Data1" + + cp -av "${srcdir}/Data1/Vlak${_year}E_Sk.tt" "${_instdir}/Data1"/ - cd "${_instdir}" && { - 7z x "${srcdir}/${_target0}" - chmod 755 Data* - chmod 644 Data*/* - } - rm -f "${_instdir}/Data1"/[vV][lL][aA][kK].[tT][tT][rR] # This one is provided by idos-timetable-data-trains-common. - rm -f "${_instdir}/Data1"/*.[tT][tT][mM] # Don't install map data here; use a seperate package for that. - rm -f "${_instdir}/Data1"/*.[tT][tT][pP] # Don't install tariff data here; use a seperate package for that. + chmod 755 "${_instdir}"/Data* + chmod 644 "${_instdir}"/Data*/* install -d -m755 "${pkgdir}/usr/share/doc/${_pkgname}" echo "${url}" > "${pkgdir}/usr/share/doc/${_pkgname}/info.url" |