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