You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
6.5 KiB

  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # Author: Michael Geddes
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=zoneinfo
  10. PKG_VERSION:=2016h
  11. PKG_VERSION_CODE:=2016h
  12. PKG_RELEASE:=1
  13. #As i couldn't find real license used "Public Domain"
  14. #as referense to http://www.iana.org/time-zones/repository/tz-link.html
  15. PKG_LICENSE:=Public Domain
  16. PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
  17. PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
  18. PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
  19. PKG_MD5SUM:=878f0ec3fd9e4026ea11dd1b649a315a
  20. include $(INCLUDE_DIR)/package.mk
  21. define Download/tzcode
  22. FILE=$(PKG_SOURCE_CODE)
  23. URL=$(PKG_SOURCE_URL)
  24. MD5SUM:=00c20689d996dea4cf5b45504724ce8f
  25. endef
  26. $(eval $(call Download,tzcode))
  27. define Package/zoneinfo/Default
  28. SUBMENU:=zoneinfo
  29. TITLE:=Zone Information
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. MAINTAINER:=Vladimir Ulrich <admin@evl.su>
  33. endef
  34. define Package/zoneinfo-core
  35. $(call Package/zoneinfo/Default)
  36. TITLE:=Zone Information (core)
  37. endef
  38. define Package/zoneinfo-simple
  39. $(call Package/zoneinfo/Default)
  40. TITLE:=Zone Information (simple)
  41. endef
  42. define Package/zoneinfo-africa
  43. $(call Package/zoneinfo/Default)
  44. TITLE:=Zone Information (Africa)
  45. endef
  46. define Package/zoneinfo-northamerica
  47. $(call Package/zoneinfo/Default)
  48. TITLE:=Zone Information (NorthAmerica)
  49. endef
  50. define Package/zoneinfo-southamerica
  51. $(call Package/zoneinfo/Default)
  52. TITLE:=Zone Information (SouthAmerica)
  53. endef
  54. define Package/zoneinfo-poles
  55. $(call Package/zoneinfo/Default)
  56. TITLE:=Zone Information (Arctic, Antarctic)
  57. endef
  58. define Package/zoneinfo-asia
  59. $(call Package/zoneinfo/Default)
  60. TITLE:=Zone Information (Asia)
  61. endef
  62. define Package/zoneinfo-atlantic
  63. $(call Package/zoneinfo/Default)
  64. TITLE:=Zone Information (Atlantic)
  65. endef
  66. define Package/zoneinfo-australia-nz
  67. $(call Package/zoneinfo/Default)
  68. TITLE:=Zone Information (Australia-NZ)
  69. endef
  70. define Package/zoneinfo-pacific
  71. $(call Package/zoneinfo/Default)
  72. TITLE:=Zone Information (Pacific)
  73. endef
  74. define Package/zoneinfo-europe
  75. $(call Package/zoneinfo/Default)
  76. TITLE:=Zone Information (Europe)
  77. endef
  78. define Package/zoneinfo-india
  79. $(call Package/zoneinfo/Default)
  80. TITLE:=Zone Information (India)
  81. endef
  82. define Build/Prepare
  83. (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
  84. endef
  85. define Build/Compile
  86. CFLAGS="$(HOST_CFLAGS)" \
  87. $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
  88. $(HOST_CONFIGURE_OPTS) \
  89. CC="$(HOSTCC)" \
  90. LD="\$$$$(CC)" \
  91. CPPFLAGS="$(HOST_CPPFLAGS)" \
  92. LDFLAGS="$(HOST_LDFLAGS)" \
  93. TOPDIR="$(PKG_INSTALL_DIR)" \
  94. TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
  95. install
  96. endef
  97. define Package/zoneinfo-core/install
  98. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  99. for i in \
  100. CET CST6CDT EET EST EST5EDT GB-Eire Eire \
  101. GB GMT GMT+0 GMT-0 GMT0 Greenwich \
  102. HST MET MST MST7MDT \
  103. PRC PST8PDT ROC ROK UCT UTC \
  104. Universal W-SU WET Zulu Etc/* zone.tab ; do \
  105. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  106. $(1)/usr/share/zoneinfo ; \
  107. done
  108. endef
  109. define Package/zoneinfo-simple/install
  110. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  111. for i in Pacific/Honolulu \
  112. America/Anchorage America/Los_Angeles America/Denver \
  113. America/Chicago America/New_York America/Caracas \
  114. America/Sao_Paulo Europe/London Europe/Paris \
  115. Africa/Cairo Europe/Moscow Asia/Dubai \
  116. Asia/Karachi Asia/Dhaka Asia/Bankok \
  117. Asia/Hong_Kong Asia/Tokyo Australia/Darwin \
  118. Australia/Adelaide Australia/Brisbane Australia/Sydney \
  119. Australia/Perth Pacific/Noumea ; do \
  120. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  121. $(1)/usr/share/zoneinfo ; \
  122. done
  123. endef
  124. define Package/zoneinfo-africa/install
  125. $(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa
  126. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \
  127. $(1)/usr/share/zoneinfo/Africa
  128. endef
  129. define Package/zoneinfo-northamerica/install
  130. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  131. for i in US America Canada Mexico Cuba Jamaica Navajo ; do \
  132. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  133. $(1)/usr/share/zoneinfo ; \
  134. done
  135. rm -rf $(1)/usr/share/zoneinfo/America/Argentina
  136. endef
  137. define Package/zoneinfo-southamerica/install
  138. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  139. for i in Brazil Chile ; do \
  140. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  141. $(1)/usr/share/zoneinfo ; \
  142. done
  143. $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
  144. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
  145. $(1)/usr/share/zoneinfo/America/Argentina
  146. endef
  147. define Package/zoneinfo-poles/install
  148. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  149. for i in Antarctica Arctic ; do \
  150. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  151. $(1)/usr/share/zoneinfo ; \
  152. done
  153. endef
  154. define Package/zoneinfo-asia/install
  155. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  156. for i in Asia Japan Singapore Hongkong ; do \
  157. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  158. $(1)/usr/share/zoneinfo ; \
  159. done
  160. endef
  161. define Package/zoneinfo-atlantic/install
  162. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  163. for i in Atlantic Iceland ; do \
  164. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  165. $(1)/usr/share/zoneinfo ; \
  166. done
  167. endef
  168. define Package/zoneinfo-australia-nz/install
  169. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  170. for i in NZ NZ-CHAT Australia ; do \
  171. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  172. $(1)/usr/share/zoneinfo ; \
  173. done
  174. endef
  175. define Package/zoneinfo-pacific/install
  176. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  177. for i in Pacific Kwajalein ; do \
  178. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  179. $(1)/usr/share/zoneinfo ; \
  180. done
  181. endef
  182. define Package/zoneinfo-europe/install
  183. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  184. for i in Europe Portugal Poland ; do \
  185. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  186. $(1)/usr/share/zoneinfo ; \
  187. done
  188. endef
  189. define Package/zoneinfo-india/install
  190. $(INSTALL_DIR) $(1)/usr/share/zoneinfo
  191. for i in Indian ; do \
  192. $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
  193. $(1)/usr/share/zoneinfo ; \
  194. done
  195. endef
  196. $(eval $(call BuildPackage,zoneinfo-simple))
  197. $(eval $(call BuildPackage,zoneinfo-core))
  198. $(eval $(call BuildPackage,zoneinfo-africa))
  199. $(eval $(call BuildPackage,zoneinfo-northamerica))
  200. $(eval $(call BuildPackage,zoneinfo-southamerica))
  201. $(eval $(call BuildPackage,zoneinfo-poles))
  202. $(eval $(call BuildPackage,zoneinfo-asia))
  203. $(eval $(call BuildPackage,zoneinfo-atlantic))
  204. $(eval $(call BuildPackage,zoneinfo-australia-nz))
  205. $(eval $(call BuildPackage,zoneinfo-pacific))
  206. $(eval $(call BuildPackage,zoneinfo-europe))
  207. $(eval $(call BuildPackage,zoneinfo-india))