tzutils: update to 2022c.

This commit is contained in:
Đoàn Trần Công Danh 2022-08-17 19:13:09 +07:00
parent 137ff8ef50
commit 66412d5654
2 changed files with 16 additions and 6 deletions

View File

@ -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 <congdanhqx@gmail.com>"
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

View File

@ -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
;;