Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 e9c775bb76c9700521ada77776277c25f8650a22b56d46c9f00f4147970ef13e
  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 tzcode${PKG_VERSION}.tar.gz
  15. # both archives do not extract into subdirectories
  16. WRKDIST= ${WRKDIR}
  17. # no use for tzselect, since that is a ksh-script
  18. PKG_SUBPKGS:= TZDATA DATE
  19. PKGSD_DATE:= famous date utility
  20. include $(ADK_TOPDIR)/mk/package.mk
  21. $(eval $(call PKG_template,TZDATA,tzdata,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  22. $(eval $(call PKG_template,DATE,date,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DATE},${PKG_SECTION}))
  23. CONFIG_STYLE:= manual
  24. HOST_CFLAGS+= -DSTD_INSPIRED=1 -DHAVE_STDINT_H=1
  25. TARGET_CFLAGS+= -DHAVE_INTTYPES_H=1
  26. XAKE_FLAGS+= TZDIR="/usr/share/zoneinfo" cc="${TARGET_CC}"
  27. # the uppercase targets enable building and installation of the date utility
  28. ALL_TARGET:= ALL
  29. INSTALL_TARGET:= INSTALL
  30. tzdata-install:
  31. $(INSTALL_DIR) $(IDIR_TZDATA)/usr/share/zoneinfo $(IDIR_TZDATA)/etc
  32. cd ${WRKINST} && for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
  33. test -s usr/share/zoneinfo/"$$f" || continue; \
  34. echo usr/share/zoneinfo/"$$f" | \
  35. ${STAGING_HOST_DIR}/usr/bin/cpio -pdu ${IDIR_TZDATA}/; \
  36. done
  37. tz=; cd $(IDIR_TZDATA)/usr/share/zoneinfo || exit 1; \
  38. for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
  39. test -s "$$f" || continue; \
  40. tz=$$f; \
  41. done; if test x"$$tz" = x""; then \
  42. echo >&2 Error during timezone installation; \
  43. exit 1; \
  44. else \
  45. ln -sf "../usr/share/zoneinfo/$$tz" \
  46. $(IDIR_TZDATA)/etc/localtime; \
  47. fi
  48. date-install:
  49. ${INSTALL_DIR} ${IDIR_DATE}/usr/bin
  50. ${INSTALL_BIN} ${WRKINST}/usr/bin/date ${IDIR_DATE}/usr/bin/
  51. include ${ADK_TOPDIR}/mk/pkg-bottom.mk