1 ################################################################################
5 ################################################################################
8 TZDATA_SOURCE
= tzdata
$(TZDATA_VERSION
).
tar.gz
9 TZDATA_SITE
= ftp
://ftp.iana.org
/tz
/releases
10 TZDATA_DEPENDENCIES
= host-tzdata
11 HOST_TZDATA_DEPENDENCIES
= host-zic
12 TZDATA_LICENSE
= Public domain
14 TZDATA_DEFAULT_ZONELIST
= \
15 africa antarctica asia australasia backward etcetera \
16 europe factory northamerica pacificnew southamerica
18 ifeq ($(call qstrip
,$(BR2_TARGET_TZ_ZONELIST
)),default
)
19 TZDATA_ZONELIST
= $(TZDATA_DEFAULT_ZONELIST
)
21 TZDATA_ZONELIST
= $(call qstrip
,$(BR2_TARGET_TZ_ZONELIST
))
24 TZDATA_LOCALTIME
= $(call qstrip
,$(BR2_TARGET_LOCALTIME
))
26 # No need to extract for target, we're using the host-installed files
29 define TZDATA_INSTALL_TARGET_CMDS
30 $(INSTALL
) -d
-m
0755 $(TARGET_DIR
)/usr
/share
/zoneinfo
31 cp
-a
$(HOST_DIR
)/usr
/share
/zoneinfo
/* $(TARGET_DIR
)/usr
/share
/zoneinfo
32 cd
$(TARGET_DIR
)/usr
/share
/zoneinfo
; \
33 for zone in posix
/*; do \
34 ln
-sfn
"$${zone}" "$${zone##*/}"; \
36 if
[ -n
"$(TZDATA_LOCALTIME)" ]; then \
37 if
[ ! -f
$(TARGET_DIR
)/usr
/share
/zoneinfo
/$(TZDATA_LOCALTIME
) ]; then \
38 printf
"Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
39 "$(TZDATA_LOCALTIME)"; \
42 cd
$(TARGET_DIR
)/etc
; \
43 ln
-sf ..
/usr
/share
/zoneinfo
/$(TZDATA_LOCALTIME
) localtime
; \
44 echo
"$(TZDATA_LOCALTIME)" >timezone
; \
48 define HOST_TZDATA_EXTRACT_CMDS
49 gzip
-d
-c
$(DL_DIR
)/$(TZDATA_SOURCE
) \
50 |
$(TAR
) --strip-components
=0 -C
$(@D
) -xf
-
53 define HOST_TZDATA_BUILD_CMDS
55 for zone in
$(TZDATA_ZONELIST
); do \
56 $(ZIC
) -d _output
/posix
-y yearistype.sh
$$zone; \
57 $(ZIC
) -d _output
/right
-L leapseconds
-y yearistype.sh
$$zone; \
62 define HOST_TZDATA_INSTALL_CMDS
63 $(INSTALL
) -d
-m
0755 $(HOST_DIR
)/usr
/share
/zoneinfo
64 cp
-a
$(@D
)/_output
/* $(@D
)/*.tab
$(HOST_DIR
)/usr
/share
/zoneinfo
67 $(eval
$(generic-package
))
68 $(eval
$(host-generic-package
))