source: packages/utils/zoneinfo/Makefile @ 28304

Last change on this file since 28304 was 28304, checked in by jow, 5 years ago

[packages] utils: add zoneinfo package (moved from LuCI feed)

File size: 6.7 KB
Line 
1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id:$
8#
9# Author: Michael Geddes
10
11include $(TOPDIR)/rules.mk
12
13PKG_NAME:=zoneinfo
14PKG_VERSION:=2011i
15PKG_RELEASE:=1
16
17PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
18PKG_SOURCE_CODE:=tzcode${PKG_VERSION}.tar.gz
19PKG_SOURCE_URL:=http://source.icu-project.org/repos/icu/data/trunk/tzdata/mirror/
20PKG_MD5SUM:=c7a86ec34f30f8d6aa77ef94902a3047
21
22include $(INCLUDE_DIR)/package.mk
23
24define Download/tzcode
25   FILE=$(PKG_SOURCE_CODE)
26   URL=$(PKG_SOURCE_URL)
27   MD5SUM=cf7f4335b7c8682899fa2814e711c1b2
28endef
29
30$(eval $(call Download,tzcode))
31
32define Package/zoneinfo/Default
33  SUBMENU:=zoneinfo
34  TITLE:=Zone Information
35  SECTION:=utils
36  CATEGORY:=Utilities
37endef
38
39define Package/zoneinfo-core
40$(call Package/zoneinfo/Default)
41  TITLE:=Zone Information (core)
42endef
43
44define Package/zoneinfo-simple
45$(call Package/zoneinfo/Default)
46  TITLE:=Zone Information (simple)
47endef
48
49define Package/zoneinfo-africa
50$(call Package/zoneinfo/Default)
51  TITLE:=Zone Information (Africa)
52endef
53
54define Package/zoneinfo-northamerica
55$(call Package/zoneinfo/Default)
56  TITLE:=Zone Information (NorthAmerica)
57endef
58
59define Package/zoneinfo-southamerica
60$(call Package/zoneinfo/Default)
61  TITLE:=Zone Information (SouthAmerica)
62endef
63
64define Package/zoneinfo-poles
65$(call Package/zoneinfo/Default)
66  TITLE:=Zone Information (Arctic, Antarctic)
67endef
68
69define Package/zoneinfo-asia
70$(call Package/zoneinfo/Default)
71  TITLE:=Zone Information (Asia)
72endef
73
74define Package/zoneinfo-atlantic
75$(call Package/zoneinfo/Default)
76  TITLE:=Zone Information (Atlantic)
77endef
78
79define Package/zoneinfo-australia-nz
80$(call Package/zoneinfo/Default)
81  TITLE:=Zone Information (Australia-NZ)
82endef
83
84define Package/zoneinfo-pacific
85$(call Package/zoneinfo/Default)
86  TITLE:=Zone Information (Pacific)
87endef
88
89define Package/zoneinfo-europe
90$(call Package/zoneinfo/Default)
91  TITLE:=Zone Information (Europe)
92endef
93
94define Package/zoneinfo-india
95$(call Package/zoneinfo/Default)
96  TITLE:=Zone Information (India)
97endef
98
99define Package/zoneinfo-middleeast
100$(call Package/zoneinfo/Default)
101  TITLE:=Zone Information (MiddleEast)
102endef
103
104define Build/Prepare
105        (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
106endef
107
108define Build/Compile
109        CFLAGS="$(HOST_CFLAGS)" \
110        $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
111                $(HOST_CONFIGURE_OPTS) \
112                CC="$(HOSTCC)" \
113                LD="\$$$$(CC)" \
114                CPPFLAGS="$(HOST_CPPFLAGS)" \
115                LDFLAGS="$(HOST_LDFLAGS)" \
116                TOPDIR="$(PKG_INSTALL_DIR)" \
117                TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
118                install
119endef
120
121
122define Package/zoneinfo-core/install
123        $(INSTALL_DIR) $(1)/usr/share/zoneinfo
124        for i in \
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 ; \
132        done
133endef
134
135define 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 ; \
148        done
149endef
150
151define 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
155endef
156
157define 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 ; \
162        done
163        rm  -rf $(1)/usr/share/zoneinfo/America/Argentina
164endef
165
166define 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 ; \
171        done
172        $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
173        $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
174              $(1)/usr/share/zoneinfo/America/Argentina
175endef
176
177define 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 ; \
182        done
183endef
184
185define 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 ; \
190        done
191endef
192
193define 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 ; \
198        done
199endef
200
201define 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 ; \
206        done
207endef
208
209define 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 ; \
214        done
215endef
216
217define 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 ; \
222        done
223endef
224
225
226define 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 ; \
231        done
232endef
233
234define 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 ; \
239        done
240endef
241
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))
255
Note: See TracBrowser for help on using the repository browser.