tzutils: merge tzdata template
- Use upstream pre-generated tarball - tzutils and tzdata has been coupled together for a long time. - Use original install rules since upstream recommends shipping tzdata.zi c.f. https://mm.icann.org/pipermail/tz/2022-July/031703.html - Fix zdump on 32bit-timestamp zdump(8)
This commit is contained in:
parent
565f953516
commit
fc114c1c29
1
srcpkgs/tzdata
Symbolic link
1
srcpkgs/tzdata
Symbolic link
@ -0,0 +1 @@
|
||||
tzutils
|
@ -1,25 +0,0 @@
|
||||
# Template file for 'tzdata'
|
||||
pkgname=tzdata
|
||||
version=2022a
|
||||
revision=1
|
||||
bootstrap=yes
|
||||
create_wrksrc=yes
|
||||
hostmakedepends="tzutils"
|
||||
short_desc="Time zone and daylight-saving time data"
|
||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||
license="Public Domain"
|
||||
homepage="http://www.iana.org/time-zones"
|
||||
distfiles="http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz"
|
||||
checksum=ef7fffd9f4f50f4f58328b35022a32a5a056b245c5cb3d6791dddb342f871664
|
||||
|
||||
do_install() {
|
||||
local timezones="africa antarctica asia australasia europe northamerica \
|
||||
southamerica etcetera backward factory"
|
||||
|
||||
zic -b fat -d ${DESTDIR}/usr/share/zoneinfo ${timezones}
|
||||
zic -b fat -d ${DESTDIR}/usr/share/zoneinfo/posix ${timezones}
|
||||
zic -b fat -d ${DESTDIR}/usr/share/zoneinfo/right -L leapseconds ${timezones}
|
||||
|
||||
zic -b fat -d ${DESTDIR}/usr/share/zoneinfo -p America/New_York
|
||||
install -m444 -t ${DESTDIR}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab
|
||||
}
|
@ -1,20 +1,31 @@
|
||||
# Template file for 'tzutils'
|
||||
pkgname=tzutils
|
||||
version=2022a
|
||||
revision=1
|
||||
revision=2
|
||||
bootstrap=yes
|
||||
wrksrc="tz-${version}"
|
||||
wrksrc="tzdb-${version}"
|
||||
short_desc="Time zone and daylight-saving time utilities"
|
||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||
license="Public Domain, BSD-3-Clause"
|
||||
license="Public Domain"
|
||||
homepage="https://www.iana.org/time-zones"
|
||||
distfiles="https://github.com/eggert/tz/archive/${version}.tar.gz"
|
||||
checksum=e9d82a851a15bb5db2cbaae2c3fc633743ad9edc069e3738c5e8908978064ed8
|
||||
distfiles="https://www.iana.org/time-zones/repository/releases/tzdb-${version}.tar.lz"
|
||||
checksum=46123b769c55190138cf64e80db605b86f710dc6ca2a15df431966e7fd6e8490
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends="tzutils"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
||||
# enforce 64-bit time_t for Y2038
|
||||
CFLAGS="-Dtime_tz=int64_t"
|
||||
license+=", BSD-3-Clause"
|
||||
fi
|
||||
|
||||
do_build() {
|
||||
echo "$version" >version
|
||||
make TZDIR=/usr/share/zoneinfo KSHELL=/bin/sh \
|
||||
touch version
|
||||
make KSHELL=/bin/sh \
|
||||
CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||
sed -n '/Copyright/,/SUCH DAMAGE/p' strftime.c >strftime.license
|
||||
}
|
||||
|
||||
do_check() {
|
||||
@ -22,11 +33,24 @@ do_check() {
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin zic
|
||||
vbin zdump
|
||||
vbin tzselect
|
||||
vman zic.8
|
||||
vman zdump.8
|
||||
vman tzselect.8
|
||||
vlicense LICENSE
|
||||
local zic
|
||||
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}
|
||||
# Backward compatible links
|
||||
ln -s ../zoneinfo-posix "$DESTDIR/usr/share/zoneinfo/posix"
|
||||
ln -s ../zoneinfo-leaps "$DESTDIR/usr/share/zoneinfo/right"
|
||||
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
||||
vlicense strftime.license
|
||||
fi
|
||||
}
|
||||
|
||||
tzdata_package() {
|
||||
short_desc="Time zone and daylight-saving time data"
|
||||
pkg_install() {
|
||||
vmove usr/share/man/man5
|
||||
vmove "usr/share/zoneinfo*"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user