4 # HOW TO UPDATE THE ZONEINFO DATA
6 # With the use of subversion, this is a little bit simpler than the CVS method.
8 # Import the new sources to the vendor branch:
10 # $ cd ~/svn/vendor/tzdata/dist
11 # $ tar zxvf /usr/ports/distfile/tzdata2008X.tar.gz
12 # (check with "svn stat" and "svn diff" if it all makes sense)
13 # $ svn commit # Commit message: "Vendor import of tzdata2008X (+details)"
17 # $ cd ~/svn/vendor/tzdata
18 # $ svn cp svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist \
19 # svn+ssh://svn.freebsd.org/base/vendor/tzdata/tzdata2008X
20 # $ svn commit # Commit message: "Tag of tzdata2008X"
24 # $ cd ~/svn/head/contrib/tzdata
26 # $ svn merge -c X --accept=postpone \
27 # svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist .
28 # $ svn commit # Commit message: "MFV of tzdata2008X"
31 .include <src.opts.mk>
33 CLEANFILES+= yearistype
35 CONTRIBDIR= ${SRCTOP}/contrib/tzdata/
38 .if defined(LEAPSECONDS)
39 .warning "Using backwards compatibility variable for LEAPSECONDS; please use WITH_ZONEINFO_LEAPSECONDS_SUPPORT instead"
40 MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes
43 .if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no"
44 LEAPFILE= -L ${CONTRIBDIR}leapseconds
49 TZFILES= africa antarctica asia australasia etcetera europe \
50 factory northamerica southamerica
51 TZFILES+= backward systemv
52 POSIXRULES= America/New_York
54 TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/}
56 TZBUILDDIR= ${.OBJDIR}/builddir
62 America/North_Dakota \
73 TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil
75 .if !defined(_SKIP_BUILD)
78 META_TARGETS+= zoneinfo install-zoneinfo
80 zoneinfo: yearistype ${TDATA}
81 mkdir -p ${TZBUILDDIR}
82 cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}
83 umask 022; cd ${.CURDIR}; \
84 zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
85 ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
88 # Sort TZS to ensure they are the same every build. find -s might
89 # be a shorter way to express this, but it's non-portable. Any
90 # differences between the two don't matter for this purpose.
93 TZS!= cd ${TZBUILDDIR} && find * -type f | LC_ALL=C sort
96 beforeinstall: install-zoneinfo
98 mkdir -p ${DESTDIR}/usr/share/zoneinfo
99 cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS}
101 ${INSTALL} ${TAG_ARGS} \
102 -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
103 ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
105 ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
106 ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
107 ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
108 ${CONTRIBDIR}/zone1970.tab ${DESTDIR}/usr/share/zoneinfo/
112 # If the file /var/db/zoneinfo exists, and it is owned by root:wheel,
113 # and the contents of it exists in /usr/share/zoneinfo, then reinstall
116 @if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \
117 -a -G ${DESTDIR}/var/db/zoneinfo ]; then \
118 zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \
119 if [ -f ${DESTDIR}/usr/share/zoneinfo/$${zf} ]; then \
120 if [ ! -z "${DESTDIR}" ]; then \
121 optC="-C ${DESTDIR}"; \
123 echo "Updating /etc/localtime"; \
124 tzsetup $${optC} -r; \
127 echo "Run tzsetup(8) manually to update /etc/localtime."; \
131 SUBDIR.${MK_TESTS}+= tests
133 .include <bsd.prog.mk>