6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
################################################################################
#
# tz
#
################################################################################
TZ_DEPENDENCIES = host-tzdata host-tzdump
TZ_LICENSE = Public domain
TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
define TZ_BUILD_CMDS
(cd $(HOST_DIR)/usr/share/zoneinfo/posix/; \
for i in $$(find . -type f); do \
mkdir -p $(@D)/output/$$(dirname $$i); \
$(TZDUMP) -p . -q $${i#./} | sed '1d' > $(@D)/output/$$i; \
done \
)
endef
define TZ_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/zone.tab \
$(TARGET_DIR)/usr/share/zoneinfo/zone.tab
$(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/iso3166.tab \
$(TARGET_DIR)/usr/share/zoneinfo/iso3166.tab
mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
if [ -n "$(TZ_LOCALTIME)" ]; then \
if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) ]; then \
printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting
" \
"$(TZDATA_LOCALTIME)"; \
exit 1; \
fi; \
cd $(TARGET_DIR)/etc; \
ln -sf ../usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) TZ; \
fi
endef
$(eval $(generic-package))
|