2 Install_Dir = /usr/sbin
5 CFILES = ialloc.c scheck.c zic.c
8 include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
11 POSIXRULES= US/Pacific
13 Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
15 # Embedded zic is probably not built with the same architecture as
16 # the build host, so we can't use the recently built copy.
17 ifeq "$(Embedded)" "YES"
20 ZIC=$(DSTROOT)/usr/sbin/zic
23 # pacificnew is obsolete and was removed from ZONE_FILES
24 ZONE_FILES = africa antarctica asia australasia europe northamerica southamerica etcetera factory backward systemv solar87 solar88 solar89
25 ZONEINFO = $(DSTROOT)/usr/share/zoneinfo
27 # ftp://elsie.nci.nih.gov/pub/tzdata*.tar.gz
28 # the tzdata*.tar.gz file is automatically unpacked and a version file created
29 # /usr/local/share/tz/tzdata*.tar.gz is installed by the TimeZoneData project
30 DATFILES = $(OBJROOT)/datfiles
31 TARBALL = $(shell ls $(SDKROOT)/usr/local/share/tz/tzdata* | sort | tail -n 1)
32 DATVERS = $(shell basename $(TARBALL) | sed -e 's,\..*,,' -e 's/^tzdata//')
33 VERSIONFILE = $(ZONEINFO)/+VERSION
37 cd $(DATFILES) && tar xzf $(TARBALL)
38 $(INSTALL_DIRECTORY) $(ZONEINFO)
39 for tz in $(ZONE_FILES); do \
40 if [[ $${tz} = "northamerica" ]]; then \
41 ARG="-p America/New_York" ; \
48 -y $(DATFILES)/yearistype.sh \
49 $(DATFILES)/$${tz} ; \
51 chmod -R og-w $(ZONEINFO)
52 $(INSTALL_FILE) $(DATFILES)/zone.tab $(ZONEINFO)
53 $(INSTALL_FILE) $(DATFILES)/iso3166.tab $(ZONEINFO)
54 ifeq "$(Embedded)" "YES"
55 $(INSTALL_DIRECTORY) $(DSTROOT)/private/var/db
56 $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/var/db/localtime
58 $(INSTALL_DIRECTORY) $(DSTROOT)/private/etc
59 $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/etc/localtime
61 echo $(DATVERS) > $(VERSIONFILE)
62 chmod 444 $(VERSIONFILE)