Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= tzdata
  5. PKG_VERSION:= 2014d
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 4b4966912f5d4a299b0bdf47e6f3103d82dc6a0b5a6b321e2b9d5662597a62f0
  8. PKG_DESCR:= timezone data (/usr/share/zoneinfo)
  9. PKG_SECTION:= base/apps
  10. PKG_URL:= http://www.iana.org/time-zones/
  11. PKG_SITES:= http://www.iana.org/time-zones/repository/releases/
  12. PKG_NOPARALLEL:= 1
  13. PKG_LIBC_DEPENDS:= glibc musl
  14. DISTFILES:= $(PKG_NAME)$(PKG_VERSION).tar.gz
  15. WRKDIST= $(WRKDIR)
  16. include $(ADK_TOPDIR)/mk/package.mk
  17. $(eval $(call PKG_template,TZDATA,tzdata,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  18. CONFIG_STYLE:= manual
  19. HOST_CFLAGS+= -DSTD_INSPIRED=1 -DHAVE_STDINT_H=1
  20. TARGET_CFLAGS+= -DHAVE_INTTYPES_H=1
  21. XAKE_FLAGS+= TZDIR="/usr/share/zoneinfo" cc="$(TARGET_CC)"
  22. ALL_TARGET:= ALL
  23. INSTALL_TARGET:= INSTALL
  24. tzdata-install:
  25. $(INSTALL_DIR) $(IDIR_TZDATA)/usr/share/zoneinfo $(IDIR_TZDATA)/etc
  26. cd $(WRKINST) && for f in UTC $(ADK_RUNTIME_TIMEZONE); do \
  27. test -s usr/share/zoneinfo/"$$f" || continue; \
  28. echo usr/share/zoneinfo/"$$f" | \
  29. $(STAGING_HOST_DIR)/usr/bin/cpio -pdu $(IDIR_TZDATA)/; \
  30. done
  31. tz=; cd $(IDIR_TZDATA)/usr/share/zoneinfo || exit 1; \
  32. for f in UTC $(ADK_RUNTIME_TIMEZONE); do \
  33. test -s "$$f" || continue; \
  34. tz=$$f; \
  35. done; if test x"$$tz" = x""; then \
  36. echo >&2 Error during timezone installation; \
  37. exit 1; \
  38. else \
  39. ln -sf "../usr/share/zoneinfo/$$tz" \
  40. $(IDIR_TZDATA)/etc/localtime; \
  41. fi
  42. include $(ADK_TOPDIR)/mk/pkg-bottom.mk