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
|
|
|
# With the use of subversion, this is a little bit simpler than the CVS method.
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# Import the new sources to the vendor branch:
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# $ cd ~/svn/vendor/tzdata/dist
|
|
|
|
# $ tar zxvf /usr/ports/distfile/tzdata2008X.tar.gz
|
|
|
|
# (check with "svn stat" and "svn diff" if it all makes sense)
|
|
|
|
# $ svn commit # Commit message: "Vendor import of tzdata2008X (+details)"
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# Tag it
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# $ cd ~/svn/vendor/tzdata
|
|
|
|
# $ svn cp svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist \
|
|
|
|
# svn+ssh://svn.freebsd.org/base/vendor/tzdata/tzdata2008X
|
2014-08-27 19:34:49 +00:00
|
|
|
# $ svn commit # Commit message: "Tag of tzdata2008X"
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2008-08-08 04:37:43 +00:00
|
|
|
# Merge-from-vendor
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
2014-08-27 19:34:49 +00:00
|
|
|
# $ cd ~/svn/head/contrib/tzdata
|
2008-08-08 04:37:43 +00:00
|
|
|
# $ svn update
|
2008-10-14 04:09:33 +00:00
|
|
|
# $ svn merge -c X --accept=postpone \
|
2008-08-08 04:37:43 +00:00
|
|
|
# svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist .
|
2014-08-27 19:34:49 +00:00
|
|
|
# $ svn commit # Commit message: "MFV of tzdata2008X"
|
2007-10-08 21:16:38 +00:00
|
|
|
#
|
|
|
|
|
1994-09-13 21:54:06 +00:00
|
|
|
CLEANFILES+= yearistype
|
2013-01-10 19:46:08 +00:00
|
|
|
CLEANDIRS+= builddir
|
2010-02-25 06:44:16 +00:00
|
|
|
CONTRIBDIR= ${.CURDIR}/../../contrib/tzdata/
|
|
|
|
.PATH: ${CONTRIBDIR}
|
1994-09-13 21:54:06 +00:00
|
|
|
|
|
|
|
.if defined(LEAPSECONDS)
|
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
|
1994-09-13 21:54:06 +00:00
|
|
|
POSIXRULES= America/New_York
|
|
|
|
|
|
|
|
.if defined(OLDTIMEZONES)
|
2005-08-31 01:33:26 +00:00
|
|
|
TZFILES+= backward systemv
|
1994-09-13 21:54:06 +00:00
|
|
|
.endif
|
|
|
|
|
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
|
1994-09-13 21:54:06 +00:00
|
|
|
|
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
|
2013-01-10 19:46:08 +00:00
|
|
|
|
|
|
|
.PHONY: zoneinfo
|
|
|
|
zoneinfo: yearistype ${TDATA}
|
|
|
|
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
|
|
|
|
|
|
|
beforeinstall:
|
|
|
|
cd ${TZBUILDDIR} && \
|
2015-10-17 09:26:16 +00:00
|
|
|
find -s * -type f -print -exec ${INSTALL} \
|
2013-01-10 19:46:08 +00:00
|
|
|
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
2013-01-11 18:37:51 +00:00
|
|
|
\{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
2010-02-25 06:44:16 +00:00
|
|
|
${CONTRIBDIR}/zone.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
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.include <bsd.prog.mk>
|