From 903a9849d50273c9d63e3be4ca85b1ea847cdf0d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Jan 2011 22:47:51 +0100 Subject: fix timezone configuration for glibc based systems --- package/glibc/Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'package/glibc') 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/ -- cgit v1.2.3