1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-09-13 21:54:06 +00:00
|
|
|
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
|
|
|
# HOW TO UPDATE THE ZONEINFO DATA
|
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# Import the new sources to the vendor branch:
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2020-12-26 02:55:57 +00:00
|
|
|
# $ cd ~/freebsd/src
|
|
|
|
# $ git worktree add ../tzdata vendor/tzdata
|
|
|
|
# $ pushd ../tzdata
|
|
|
|
# $ tar -xvf ../tzdata-latest.tar.gz
|
|
|
|
# (check with "git status" and "git diff" if it all makes sense)
|
|
|
|
# $ git add -A
|
|
|
|
# $ git commit -m "Import tzdata 20XXX"
|
2020-12-30 13:23:17 +00:00
|
|
|
# $ git tag -a -m "Tag import of tzdata 20XXX" vendor/tzdata/tzdata20XXX
|
2020-12-26 02:55:57 +00:00
|
|
|
# $ git push --follow-tags freebsd vendor/tzdata
|
|
|
|
# $ popd
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2020-12-26 02:55:57 +00:00
|
|
|
# Merge-from-vendor
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2020-12-26 02:55:57 +00:00
|
|
|
# $ git subtree merge -P contrib/tzdata vendor/tzdata
|
|
|
|
# (write a meaningful commit message)
|
|
|
|
# $ git push freebsd HEAD:main
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2020-12-26 02:55:57 +00:00
|
|
|
# MFC
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2020-12-26 02:55:57 +00:00
|
|
|
# $ git checkout -b freebsd/stable/12 stable-12
|
|
|
|
# $ git cherry-pick -x [hash of merge commit to main] -m 1 --edit
|
|
|
|
# (write a meaningful commit message)
|
|
|
|
# $ git push freebsd HEAD:stable/12
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
|
|
|
|
2017-07-06 04:19:33 +00:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
2020-12-21 16:54:23 +00:00
|
|
|
PACKAGE= zoneinfo
|
1994-09-13 21:54:06 +00:00
|
|
|
CLEANFILES+= yearistype
|
2013-01-10 19:46:08 +00:00
|
|
|
CLEANDIRS+= builddir
|
2017-03-04 11:26:40 +00:00
|
|
|
CONTRIBDIR= ${SRCTOP}/contrib/tzdata/
|
2010-02-25 06:44:16 +00:00
|
|
|
.PATH: ${CONTRIBDIR}
|
1994-09-13 21:54:06 +00:00
|
|
|
|
|
|
|
.if defined(LEAPSECONDS)
|
2017-07-06 04:19:33 +00:00
|
|
|
.warning "Using backwards compatibility variable for LEAPSECONDS; please use WITH_ZONEINFO_LEAPSECONDS_SUPPORT instead"
|
|
|
|
MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no"
|
2015-08-22 07:41:28 +00:00
|
|
|
LEAPFILE= -L ${CONTRIBDIR}leapseconds
|
1994-09-13 21:54:06 +00:00
|
|
|
.else
|
1995-11-16 02:00:38 +00:00
|
|
|
LEAPFILE=
|
1994-09-13 21:54:06 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
TZFILES= africa antarctica asia australasia etcetera europe \
|
2005-08-31 01:33:26 +00:00
|
|
|
factory northamerica southamerica
|
|
|
|
TZFILES+= backward systemv
|
2020-04-09 05:11:18 +00:00
|
|
|
POSIXRULES= America/New_York
|
1994-09-13 21:54:06 +00:00
|
|
|
|
2010-02-25 06:44:16 +00:00
|
|
|
TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/}
|
|
|
|
|
2013-01-10 19:46:08 +00:00
|
|
|
TZBUILDDIR= ${.OBJDIR}/builddir
|
|
|
|
TZBUILDSUBDIRS= \
|
|
|
|
Africa \
|
|
|
|
America/Argentina \
|
|
|
|
America/Indiana \
|
|
|
|
America/Kentucky \
|
|
|
|
America/North_Dakota \
|
|
|
|
Antarctica \
|
|
|
|
Arctic \
|
|
|
|
Asia \
|
|
|
|
Atlantic \
|
|
|
|
Australia \
|
|
|
|
Etc \
|
|
|
|
Europe \
|
|
|
|
Indian \
|
|
|
|
Pacific \
|
|
|
|
SystemV
|
2016-11-15 06:37:44 +00:00
|
|
|
TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil
|
|
|
|
|
2016-03-11 23:45:17 +00:00
|
|
|
.if !defined(_SKIP_BUILD)
|
2013-01-10 19:46:08 +00:00
|
|
|
all: zoneinfo
|
2016-03-11 23:45:17 +00:00
|
|
|
.endif
|
2016-03-11 23:45:28 +00:00
|
|
|
META_TARGETS+= zoneinfo install-zoneinfo
|
2013-01-10 19:46:08 +00:00
|
|
|
|
2016-04-14 21:04:42 +00:00
|
|
|
zoneinfo: yearistype ${TDATA}
|
2013-01-10 19:46:08 +00:00
|
|
|
mkdir -p ${TZBUILDDIR}
|
|
|
|
cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}
|
1994-09-13 21:54:06 +00:00
|
|
|
umask 022; cd ${.CURDIR}; \
|
2013-01-10 19:46:08 +00:00
|
|
|
zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
|
2004-10-19 20:38:49 +00:00
|
|
|
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
|
2013-01-10 19:46:08 +00:00
|
|
|
|
2018-02-06 23:12:16 +00:00
|
|
|
#
|
|
|
|
# Sort TZS to ensure they are the same every build. find -s might
|
|
|
|
# be a shorter way to express this, but it's non-portable. Any
|
|
|
|
# differences between the two don't matter for this purpose.
|
|
|
|
#
|
2017-06-26 15:40:24 +00:00
|
|
|
.if make(*install*)
|
2018-02-09 15:50:32 +00:00
|
|
|
TZS!= cd ${TZBUILDDIR} && find * -type f | LC_ALL=C sort
|
2017-06-26 15:40:24 +00:00
|
|
|
.endif
|
|
|
|
|
2016-03-11 23:45:20 +00:00
|
|
|
beforeinstall: install-zoneinfo
|
2016-04-14 21:04:42 +00:00
|
|
|
install-zoneinfo:
|
2016-12-22 18:30:29 +00:00
|
|
|
mkdir -p ${DESTDIR}/usr/share/zoneinfo
|
|
|
|
cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS}
|
2017-06-26 15:40:24 +00:00
|
|
|
.for f in ${TZS}
|
|
|
|
${INSTALL} ${TAG_ARGS} \
|
2013-01-10 19:46:08 +00:00
|
|
|
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
2017-06-28 19:05:04 +00:00
|
|
|
${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
|
2017-06-26 15:40:24 +00:00
|
|
|
.endfor
|
2016-06-16 13:34:20 +00:00
|
|
|
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
2010-02-25 06:44:16 +00:00
|
|
|
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
|
2019-07-17 06:17:27 +00:00
|
|
|
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
|
|
|
${CONTRIBDIR}/zone1970.tab ${DESTDIR}/usr/share/zoneinfo/
|
1997-03-09 09:41:44 +00:00
|
|
|
|
2009-10-21 20:59:12 +00:00
|
|
|
afterinstall:
|
2009-10-22 20:59:51 +00:00
|
|
|
#
|
|
|
|
# If the file /var/db/zoneinfo exists, and it is owned by root:wheel,
|
|
|
|
# and the contents of it exists in /usr/share/zoneinfo, then reinstall
|
|
|
|
# it.
|
|
|
|
#
|
2009-10-21 20:59:12 +00:00
|
|
|
@if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \
|
|
|
|
-a -G ${DESTDIR}/var/db/zoneinfo ]; then \
|
|
|
|
zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \
|
|
|
|
if [ -f ${DESTDIR}/usr/share/zoneinfo/$${zf} ]; then \
|
|
|
|
if [ ! -z "${DESTDIR}" ]; then \
|
|
|
|
optC="-C ${DESTDIR}"; \
|
|
|
|
fi; \
|
|
|
|
echo "Updating /etc/localtime"; \
|
2010-02-11 15:34:54 +00:00
|
|
|
tzsetup $${optC} -r; \
|
2009-10-21 20:59:12 +00:00
|
|
|
fi; \
|
|
|
|
else \
|
|
|
|
echo "Run tzsetup(8) manually to update /etc/localtime."; \
|
|
|
|
fi
|
|
|
|
|
2017-08-02 08:50:42 +00:00
|
|
|
HAS_TESTS=
|
2017-08-02 08:35:51 +00:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2017-07-06 04:30:06 +00:00
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.include <bsd.prog.mk>
|