lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (6700B)


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