diff --git a/srcpkgs/tzutils/template b/srcpkgs/tzutils/template index 507533a6951..966260e2ebf 100644 --- a/srcpkgs/tzutils/template +++ b/srcpkgs/tzutils/template @@ -1,6 +1,6 @@ # Template file for 'tzutils' pkgname=tzutils -version=2022b +version=2022c revision=1 bootstrap=yes wrksrc="tzdb-${version}" @@ -9,7 +9,7 @@ maintainer="Đoàn Trần Công Danh " license="Public Domain" homepage="https://www.iana.org/time-zones" distfiles="https://www.iana.org/time-zones/repository/releases/tzdb-${version}.tar.lz" -checksum=ac7e86da284b303244c457337ff5a4d17a4617a25777c87946668a1705f7b7ec +checksum=2e178330282e2832731e27136c3bc6f9eaf94a2c6b42691517151b349f751b24 if [ "$CROSS_BUILD" ]; then hostmakedepends="tzutils" @@ -33,14 +33,24 @@ do_check() { } do_install() { - local zic + local zic _file if [ "$CROSS_BUILD" ]; then zic="zic=/usr/bin/zic" fi make install DESTDIR="$DESTDIR" ZICDIR=/usr/bin $zic ZFLAGS="-b fat" rm -rf "$DESTDIR"/{etc,usr/lib,usr/share/man/man3} + # old structure, + # noone should use posix/xxx since it's the same as xxx + mkdir "$DESTDIR/usr/share/zoneinfo/posix" + for _file in "$DESTDIR/usr/share/zoneinfo/"[A-Z]*; do + _file="${_file##*/}" + ln -s "../$_file" "$DESTDIR/usr/share/zoneinfo/posix/$_file" + done + # Because TZ=../zoneinfo-posix/posix/posix" is stupid + rm -f "$DESTDIR/usr/share/zoneinfo-posix" + ln -s zoneinfo/posix "$DESTDIR/usr/share/zoneinfo-posix" # Backward compatible links - ln -s ../zoneinfo-posix "$DESTDIR/usr/share/zoneinfo/posix" + # TZ=right/... known to be broken especially on musl, but whatever ln -s ../zoneinfo-leaps "$DESTDIR/usr/share/zoneinfo/right" if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then vlicense strftime.license diff --git a/srcpkgs/tzutils/tzdata.INSTALL b/srcpkgs/tzutils/tzdata.INSTALL index 5b91eff8294..a6a50de6a41 100755 --- a/srcpkgs/tzutils/tzdata.INSTALL +++ b/srcpkgs/tzutils/tzdata.INSTALL @@ -3,8 +3,8 @@ pre) # Due to some reasons, some old timezone was kept # The latest one would be Canada/East-Saskatchewan in 2017c # Don't force remove on everyone since it will spit error on update - if [ -f usr/share/zoneinfo/posix/Canada/East-Saskatchewan ]; then - rm -rf usr/share/zoneinfo/posix + if [ ! -L usr/share/zoneinfo/right ] && + [ -f usr/share/zoneinfo/right/Canada/East-Saskatchewan ]; then rm -rf usr/share/zoneinfo/right fi ;;