1 ################################################################################
5 ################################################################################
8 TZDATA_SOURCE
= tzdata
$(TZDATA_VERSION
).
tar.gz
9 TZDATA_SITE
= http
://www.iana.org
/time-zones
/repository
/releases
10 TZDATA_STRIP_COMPONENTS
= 0
11 TZDATA_DEPENDENCIES
= host-tzdata
12 HOST_TZDATA_DEPENDENCIES
= host-zic
13 TZDATA_LICENSE
= Public domain
15 # Take care when re-ordering this list since this might break zone
17 TZDATA_DEFAULT_ZONELIST
= \
18 africa antarctica asia australasia europe northamerica \
19 southamerica pacificnew etcetera backward systemv factory
21 ifeq ($(call qstrip
,$(BR2_TARGET_TZ_ZONELIST
)),default
)
22 TZDATA_ZONELIST
= $(TZDATA_DEFAULT_ZONELIST
)
24 TZDATA_ZONELIST
= $(call qstrip
,$(BR2_TARGET_TZ_ZONELIST
))
27 TZDATA_LOCALTIME
= $(call qstrip
,$(BR2_TARGET_LOCALTIME
))
29 # No need to extract for target, we're using the host-installed files
32 define TZDATA_INSTALL_TARGET_CMDS
33 $(INSTALL
) -d
-m
0755 $(TARGET_DIR
)/usr
/share
/zoneinfo
34 cp
-a
$(HOST_DIR
)/usr
/share
/zoneinfo
/* $(TARGET_DIR
)/usr
/share
/zoneinfo
35 cd
$(TARGET_DIR
)/usr
/share
/zoneinfo
; \
36 for zone in posix
/*; do \
37 ln
-sfn
"$${zone}" "$${zone##*/}"; \
39 if
[ -n
"$(TZDATA_LOCALTIME)" ]; then \
40 if
[ ! -f
$(TARGET_DIR
)/usr
/share
/zoneinfo
/$(TZDATA_LOCALTIME
) ]; then \
41 printf
"Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
42 "$(TZDATA_LOCALTIME)"; \
45 cd
$(TARGET_DIR
)/etc
; \
46 ln
-sf ..
/usr
/share
/zoneinfo
/$(TZDATA_LOCALTIME
) localtime
; \
47 echo
"$(TZDATA_LOCALTIME)" >timezone
; \
51 define HOST_TZDATA_BUILD_CMDS
53 for zone in
$(TZDATA_ZONELIST
); do \
54 $(ZIC
) -d _output
/posix
-y yearistype.sh
$$zone || exit
1; \
55 $(ZIC
) -d _output
/right
-L leapseconds
-y yearistype.sh
$$zone || exit
1; \
60 define HOST_TZDATA_INSTALL_CMDS
61 $(INSTALL
) -d
-m
0755 $(HOST_DIR
)/usr
/share
/zoneinfo
62 cp
-a
$(@D
)/_output
/* $(@D
)/*.tab
$(HOST_DIR
)/usr
/share
/zoneinfo
65 $(eval
$(generic-package
))
66 $(eval
$(host-generic-package
))