Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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:= utils
  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 ZDUMP ZIC DATE
  18. PKGSD_ZDUMP:= timezone file dumper
  19. PKGSD_ZIC:= timezone file compiler
  20. PKGSD_DATE:= famous date utility
  21. include $(TOPDIR)/mk/package.mk
  22. $(eval $(call PKG_template,TZDATA,tzdata,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  23. $(eval $(call PKG_template,ZDUMP,zdump,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ZDUMP},${PKG_SECTION}))
  24. $(eval $(call PKG_template,ZIC,zic,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_ZIC},${PKG_SECTION}))
  25. $(eval $(call PKG_template,DATE,date,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DATE},${PKG_SECTION}))
  26. CONFIG_STYLE:= manual
  27. CFLAGS_FOR_BUILD+= -DSTD_INSPIRED=1
  28. TARGET_CFLAGS+= -DHAVE_INTTYPES_H=1
  29. XAKE_FLAGS+= TOPDIR="${WRKINST}" TZDIR="${WRKINST}/usr/share/zoneinfo" cc="${TARGET_CC}"
  30. # the uppercase targets enable building and installation of the date utility
  31. ALL_TARGET:= ALL
  32. INSTALL_TARGET:= INSTALL
  33. tzdata-install:
  34. $(INSTALL_DIR) $(IDIR_TZDATA)/usr/share/zoneinfo $(IDIR_TZDATA)/etc
  35. cd ${WRKINST} && for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
  36. test -s usr/share/zoneinfo/"$$f" || continue; \
  37. echo usr/share/zoneinfo/"$$f" | \
  38. ${STAGING_HOST_DIR}/usr/bin/cpio -pdu ${IDIR_TZDATA}/; \
  39. done
  40. tz=; cd $(IDIR_TZDATA)/usr/share/zoneinfo || exit 1; \
  41. for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \
  42. test -s "$$f" || continue; \
  43. tz=$$f; \
  44. done; if test x"$$tz" = x""; then \
  45. echo >&2 Error during timezone installation; \
  46. exit 1; \
  47. else \
  48. ln -sf "../usr/share/zoneinfo/$$tz" \
  49. $(IDIR_TZDATA)/etc/localtime; \
  50. fi
  51. zdump-install:
  52. ${INSTALL_DIR} ${IDIR_ZDUMP}/usr/sbin
  53. ${INSTALL_BIN} ${WRKINST}/etc/zdump ${IDIR_ZDUMP}/usr/sbin/
  54. zic-install:
  55. ${INSTALL_DIR} ${IDIR_ZIC}/usr/sbin
  56. ${INSTALL_BIN} ${WRKINST}/etc/zic ${IDIR_ZIC}/usr/sbin/
  57. date-install:
  58. ${INSTALL_DIR} ${IDIR_DATE}/usr/bin
  59. ${INSTALL_BIN} ${WRKINST}/bin/date ${IDIR_DATE}/usr/bin/
  60. include ${TOPDIR}/mk/pkg-bottom.mk