Makefile 2.1 KB

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