summaryrefslogtreecommitdiff
path: root/package/glibc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-10 22:47:51 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-10 22:47:51 +0100
commit903a9849d50273c9d63e3be4ca85b1ea847cdf0d (patch)
treebcb33f3426ae1d557792caf7d41fed743f14445c /package/glibc
parentfa330c259421fad6bd1968ece48f66cc90a171de (diff)
fix timezone configuration for glibc based systems
Diffstat (limited to 'package/glibc')
-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/