summaryrefslogtreecommitdiff
path: root/package/glibc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/glibc/Makefile')
-rw-r--r--package/glibc/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/package/glibc/Makefile b/package/glibc/Makefile
index f509e3f3c..9d890c18b 100644
--- a/package/glibc/Makefile
+++ b/package/glibc/Makefile
@@ -23,9 +23,22 @@ INSTALL_STYLE:= manual
# compile nothing, glibc is already build in toolchain directory
do-install:
${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc
- test -z $(ADK_RUNTIME_TIMEZONE) || \
- $(CP) /usr/share/zoneinfo/$(ADK_RUNTIME_TIMEZONE) \
- $(IDIR_GLIBC)/etc/localtime
+ cd ${STAGING_TARGET_DIR} && for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
+ test -s usr/share/zoneinfo/"$$f" || continue; \
+ echo usr/share/zoneinfo/"$$f" | \
+ ${TOOLS_DIR}/cpio -pdu ${IDIR_GLIBC}/; \
+ done
+ tz=; cd ${IDIR_GLIBC}/usr/share/zoneinfo || exit 1; \
+ for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
+ test -s "$$f" || continue; \
+ tz=$$f; \
+ done; if test x"$$tz" = x""; then \
+ echo >&2 Error during timezone installation; \
+ exit 1; \
+ else \
+ ln -sf "../usr/share/zoneinfo/$$tz" \
+ ${IDIR_GLIBC}/etc/localtime; \
+ fi
${CP} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/
${CP} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/
${CP} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/