Makefile 2.1 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:= 2021e
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 07ec42b737d0d3c6be9c337f8abb5f00554a0f9cc4fcf01a703d69403b6bb2b1 584666393a5424d13d27ec01183da17703273664742e049d4f62f62dab631775
  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. $(CPIO) --quiet -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