]> git.saurik.com Git - apple/system_cmds.git/blame - zic.tproj/Makefile
system_cmds-433.1.tar.gz
[apple/system_cmds.git] / zic.tproj / Makefile
CommitLineData
916eb79e
A
1Project = zic
2Install_Dir = /usr/sbin
1815bff5 3
2fc1e207 4HFILES = private.h
1815bff5 5CFILES = ialloc.c scheck.c zic.c
916eb79e
A
6MANPAGES = zic.8
7
8include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
9
10LOCALTIME= US/Pacific
11POSIXRULES= US/Pacific
12
13Embedded=$(shell tconf --test TARGET_OS_EMBEDDED)
14
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.
17ifeq "$(Embedded)" "YES"
18ZIC=/usr/sbin/zic
19else
20ZIC=$(DSTROOT)/usr/sbin/zic
21endif
22
23# pacificnew is obsolete and was removed from ZONE_FILES
24ZONE_FILES = africa antarctica asia australasia europe northamerica southamerica etcetera factory backward systemv solar87 solar88 solar89
25ZONEINFO = $(DSTROOT)/usr/share/zoneinfo
26
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
30DATFILES = $(OBJROOT)/datfiles
31TARBALL = $(shell echo /usr/local/share/tz/tzdata*)
32DATVERS = $(shell basename $(TARBALL) | sed -e 's,\..*,,' -e 's/^tzdata//')
33VERSIONFILE = $(ZONEINFO)/+VERSION
34
35after_install:
36 $(MKDIR) $(DATFILES)
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" ; \
42 else \
43 ARG="" ; \
44 fi ; \
45 $(ZIC) $${ARG} \
46 -L /dev/null \
47 -d $(ZONEINFO) \
48 -y $(DATFILES)/yearistype.sh \
49 $(DATFILES)/$${tz} ; \
50 done
51 chmod -R og-w $(ZONEINFO)
52 $(INSTALL_FILE) $(DATFILES)/zone.tab $(ZONEINFO)
53 $(INSTALL_FILE) $(DATFILES)/iso3166.tab $(ZONEINFO)
54ifeq "$(Embedded)" "YES"
55 $(INSTALL_DIRECTORY) $(DSTROOT)/private/var/db
56 $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/var/db/localtime
57else
58 $(INSTALL_DIRECTORY) $(DSTROOT)/private/etc
59 $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/etc/localtime
60endif
61 echo $(DATVERS) > $(VERSIONFILE)
62 chmod 444 $(VERSIONFILE)