2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 # Author: Michael Geddes
11 include $(TOPDIR)/rules.mk
17 PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
18 PKG_SOURCE_CODE:=tzcode${PKG_VERSION}.tar.gz
19 PKG_SOURCE_URL:=http://source.icu-project.org/repos/icu/data/trunk/tzdata/mirror/
20 PKG_MD5SUM:=ec8fa00a07f3e1d598d5d722cc0ab697
22 include $(INCLUDE_DIR)/package.mk
24 define Download/tzcode
25 FILE=$(PKG_SOURCE_CODE)
27 MD5SUM=5a6aa9cbf477334f31e427cb59adf72f
30 $(eval $(call Download,tzcode))
32 define Package/zoneinfo/default
34 TITLE:=Zone Information
39 define Package/zoneinfo-core
40 $(call Package/zoneinfo/Default)
41 TITLE:=Zone Information (core)
44 define Package/zoneinfo-simple
45 $(call Package/zoneinfo/Default)
46 TITLE:=Zone Information (simple)
49 define Package/zoneinfo-africa
50 $(call Package/zoneinfo/Default)
51 TITLE:=Zone Information (Africa)
54 define Package/zoneinfo-northamerica
55 $(call Package/zoneinfo/Default)
56 TITLE:=Zone Information (NorthAmerica)
59 define Package/zoneinfo-southamerica
60 $(call Package/zoneinfo/Default)
61 TITLE:=Zone Information (SouthAmerica)
64 define Package/zoneinfo-poles
65 $(call Package/zoneinfo/Default)
66 TITLE:=Zone Information (Arctic, Antarctic)
69 define Package/zoneinfo-asia
70 $(call Package/zoneinfo/Default)
71 TITLE:=Zone Information (Asia)
74 define Package/zoneinfo-atlantic
75 $(call Package/zoneinfo/Default)
76 TITLE:=Zone Information (Atlantic)
79 define Package/zoneinfo-australia-nz
80 $(call Package/zoneinfo/Default)
81 TITLE:=Zone Information (Australia-NZ)
84 define Package/zoneinfo-pacific
85 $(call Package/zoneinfo/Default)
86 TITLE:=Zone Information (Pacific)
89 define Package/zoneinfo-europe
90 $(call Package/zoneinfo/Default)
91 TITLE:=Zone Information (Europe)
94 define Package/zoneinfo-india
95 $(call Package/zoneinfo/Default)
96 TITLE:=Zone Information (India)
99 define Package/zoneinfo-middleeast
100 $(call Package/zoneinfo/Default)
101 TITLE:=Zone Information (MiddleEast)
105 (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
109 CFLAGS="$(HOST_CFLAGS)" \
110 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
111 $(HOST_CONFIGURE_OPTS) \
114 CPPFLAGS="$(HOST_CPPFLAGS)" \
115 LDFLAGS="$(HOST_LDFLAGS)" \
116 TOPDIR="$(PKG_INSTALL_DIR)" \
117 TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
122 define Package/zoneinfo-core/install
123 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
125 CET CST6CDT EET EST EST5EDT GB-Eire Eire \
126 GB GMT GMT+0 GMT-0 GMT0 Greenwich \
127 HST MET MST MST7MDT NZ NZ-CHAT \
128 PRC PST8PDT ROC ROK UCT UTC \
129 Universal W-SU WET Zulu Etc/* ; do \
130 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
131 $(1)/usr/share/zoneinfo ; \
135 define Package/zoneinfo-simple/install
136 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
137 for i in Pacific/Honolulu \
138 America/Anchorage America/Los_Angeles America/Denver \
139 America/Chicago America/New_York America/Caracas \
140 America/Sao_Paulo Europe/London Europe/Paris \
141 Africa/Cairo Europe/Moscow Asia/Dubai \
142 Asia/Karachi Asia/Dhaka Asia/Bankok \
143 Asia/Hong_Kong Asia/Tokyo Australia/Darwin \
144 Australia/Adelaide Australia/Brisbane Australia/Sydney \
145 Australia/Perth Pacific/Noumea ; do \
146 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
147 $(1)/usr/share/zoneinfo ; \
151 define Package/zoneinfo-africa/install
152 $(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa
153 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \
154 $(1)/usr/share/zoneinfo/Africa
157 define Package/zoneinfo-northamerica/install
158 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
159 for i in US America Canada Mexico Cuba Jamaica Navajo ; do \
160 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
161 $(1)/usr/share/zoneinfo ; \
163 rm -rf $(1)/usr/share/zoneinfo/America/Argentina
166 define Package/zoneinfo-southamerica/install
167 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
168 for i in Brazil Chile ; do \
169 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
170 $(1)/usr/share/zoneinfo ; \
172 $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
173 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
174 $(1)/usr/share/zoneinfo/America/Argentina
177 define Package/zoneinfo-poles/install
178 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
179 for i in Antarctica Arctic ; do \
180 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
181 $(1)/usr/share/zoneinfo ; \
185 define Package/zoneinfo-asia/install
186 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
187 for i in Asia Japan Singapore Hongkong ; do \
188 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
189 $(1)/usr/share/zoneinfo ; \
193 define Package/zoneinfo-atlantic/install
194 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
195 for i in Atlantic Iceland ; do \
196 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
197 $(1)/usr/share/zoneinfo ; \
201 define Package/zoneinfo-australia-nz/install
202 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
203 for i in NZ NZ-CHAT Australia ; do \
204 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
205 $(1)/usr/share/zoneinfo ; \
209 define Package/zoneinfo-pacific/install
210 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
211 for i in Pacific Kwajalein ; do \
212 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
213 $(1)/usr/share/zoneinfo ; \
217 define Package/zoneinfo-europe/install
218 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
219 for i in Europe Portugal Poland ; do \
220 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
221 $(1)/usr/share/zoneinfo ; \
226 define Package/zoneinfo-india/install
227 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
228 for i in Indian ; do \
229 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
230 $(1)/usr/share/zoneinfo ; \
234 define Package/zoneinfo-middleeast/install
235 $(INSTALL_DIR) $(1)/usr/share/zoneinfo
236 for i in Egypt Libya Iran Israel Turkey Mideast ; do \
237 $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
238 $(1)/usr/share/zoneinfo ; \
242 $(eval $(call BuildPackage,zoneinfo-simple))
243 $(eval $(call BuildPackage,zoneinfo-core))
244 $(eval $(call BuildPackage,zoneinfo-africa))
245 $(eval $(call BuildPackage,zoneinfo-northamerica))
246 $(eval $(call BuildPackage,zoneinfo-southamerica))
247 $(eval $(call BuildPackage,zoneinfo-poles))
248 $(eval $(call BuildPackage,zoneinfo-asia))
249 $(eval $(call BuildPackage,zoneinfo-atlantic))
250 $(eval $(call BuildPackage,zoneinfo-australia-nz))
251 $(eval $(call BuildPackage,zoneinfo-pacific))
252 $(eval $(call BuildPackage,zoneinfo-europe))
253 $(eval $(call BuildPackage,zoneinfo-india))
254 $(eval $(call BuildPackage,zoneinfo-middleeast))