]>
Commit | Line | Data |
---|---|---|
916eb79e A |
1 | Project = zic |
2 | Install_Dir = /usr/sbin | |
1815bff5 | 3 | |
2fc1e207 | 4 | HFILES = private.h |
1815bff5 | 5 | CFILES = ialloc.c scheck.c zic.c |
916eb79e A |
6 | MANPAGES = zic.8 |
7 | ||
8 | include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make | |
9 | ||
10 | LOCALTIME= US/Pacific | |
11 | POSIXRULES= US/Pacific | |
12 | ||
13 | Embedded=$(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. | |
17 | ifeq "$(Embedded)" "YES" | |
18 | ZIC=/usr/sbin/zic | |
19 | else | |
20 | ZIC=$(DSTROOT)/usr/sbin/zic | |
21 | endif | |
22 | ||
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 | |
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 | |
30 | DATFILES = $(OBJROOT)/datfiles | |
31 | TARBALL = $(shell echo /usr/local/share/tz/tzdata*) | |
32 | DATVERS = $(shell basename $(TARBALL) | sed -e 's,\..*,,' -e 's/^tzdata//') | |
33 | VERSIONFILE = $(ZONEINFO)/+VERSION | |
34 | ||
35 | after_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) | |
54 | ifeq "$(Embedded)" "YES" | |
55 | $(INSTALL_DIRECTORY) $(DSTROOT)/private/var/db | |
56 | $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/var/db/localtime | |
57 | else | |
58 | $(INSTALL_DIRECTORY) $(DSTROOT)/private/etc | |
59 | $(LN) -hfs /usr/share/zoneinfo/$(LOCALTIME) $(DSTROOT)/private/etc/localtime | |
60 | endif | |
61 | echo $(DATVERS) > $(VERSIONFILE) | |
62 | chmod 444 $(VERSIONFILE) |