mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 17:02:56 +02:00
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
3 changed files with 39 additions and 39 deletions
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'
|
# Template file for 'tzutils'
|
||||||
pkgname=tzutils
|
pkgname=tzutils
|
||||||
version=2022a
|
version=2022a
|
||||||
revision=1
|
revision=2
|
||||||
bootstrap=yes
|
bootstrap=yes
|
||||||
wrksrc="tz-${version}"
|
wrksrc="tzdb-${version}"
|
||||||
short_desc="Time zone and daylight-saving time utilities"
|
short_desc="Time zone and daylight-saving time utilities"
|
||||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
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"
|
homepage="https://www.iana.org/time-zones"
|
||||||
distfiles="https://github.com/eggert/tz/archive/${version}.tar.gz"
|
distfiles="https://www.iana.org/time-zones/repository/releases/tzdb-${version}.tar.lz"
|
||||||
checksum=e9d82a851a15bb5db2cbaae2c3fc633743ad9edc069e3738c5e8908978064ed8
|
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() {
|
do_build() {
|
||||||
echo "$version" >version
|
touch version
|
||||||
make TZDIR=/usr/share/zoneinfo KSHELL=/bin/sh \
|
make KSHELL=/bin/sh \
|
||||||
CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||||
|
sed -n '/Copyright/,/SUCH DAMAGE/p' strftime.c >strftime.license
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
|
@ -22,11 +33,24 @@ do_check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vbin zic
|
local zic
|
||||||
vbin zdump
|
if [ "$CROSS_BUILD" ]; then
|
||||||
vbin tzselect
|
zic="zic=/usr/bin/zic"
|
||||||
vman zic.8
|
fi
|
||||||
vman zdump.8
|
make install DESTDIR="$DESTDIR" ZICDIR=/usr/bin $zic ZFLAGS="-b fat"
|
||||||
vman tzselect.8
|
rm -rf "$DESTDIR"/{etc,usr/lib,usr/share/man/man3}
|
||||||
vlicense LICENSE
|
# 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…
Add table
Reference in a new issue