From ed8ffc06b3fa157dd055c6e1de84454c6f246de2 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Sun, 1 Oct 2023 17:32:09 +0800 Subject: [PATCH] lua-eco: update to 3.0.0 Signed-off-by: Jianhui Zhao --- lang/lua-eco/Makefile | 119 +++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 71 deletions(-) diff --git a/lang/lua-eco/Makefile b/lang/lua-eco/Makefile index e4f3ab188f..4649474af9 100644 --- a/lang/lua-eco/Makefile +++ b/lang/lua-eco/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua-eco -PKG_VERSION:=2.5.1 +PKG_VERSION:=3.0.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL=https://github.com/zhaojh329/lua-eco/releases/download/v$(PKG_VERSION) -PKG_HASH:=436c09dd7dbc88ab651ae7696f2102b5635628ab420cc550bc237ecb04cade5d +PKG_HASH:=530b179af2283b7a1983643794f3b6de936317fe3c23a9dca4f7828dec6f7e46 PKG_MAINTAINER:=Jianhui Zhao PKG_LICENSE:=MIT @@ -26,7 +26,7 @@ define Package/lua-eco CATEGORY:=Languages SUBMENU:=Lua URL:=https://github.com/zhaojh329/lua-eco - DEPENDS:=+libev +liblua +luabitop + DEPENDS:=+libev +liblua5.3 endef define Package/lua-eco/description @@ -45,22 +45,19 @@ define Package/lua-eco/Module endef Package/lua-eco-log=$(call Package/lua-eco/Module,log utils) -Package/lua-eco-sys=$(call Package/lua-eco/Module,system utils) -Package/lua-eco-file=$(call Package/lua-eco/Module,file utils) Package/lua-eco-base64=$(call Package/lua-eco/Module,base64) Package/lua-eco-sha1=$(call Package/lua-eco/Module,sha1) Package/lua-eco-md5=$(call Package/lua-eco/Module,md5) -Package/lua-eco-socket=$(call Package/lua-eco/Module,socket,+lua-eco-file +lua-eco-sys) +Package/lua-eco-socket=$(call Package/lua-eco/Module,socket) Package/lua-eco-dns=$(call Package/lua-eco/Module,dns,+lua-eco-socket) Package/lua-eco-ssl=$(call Package/lua-eco/Module,ssl,\ +LUA_ECO_OPENSSL:libopenssl +LUA_ECO_WOLFSSL:libwolfssl \ +LUA_ECO_MBEDTLS:libmbedtls +LUA_ECO_MBEDTLS:zlib +lua-eco-socket) Package/lua-eco-ubus=$(call Package/lua-eco/Module,ubus,+libubus) -Package/lua-eco-http=$(call Package/lua-eco/Module,http/https,+lua-eco-dns +lua-eco-ssl +lua-eco-log) -Package/lua-eco-mqtt=$(call Package/lua-eco/Module,mqtt,+lua-eco-socket +lua-eco-dns +lua-mosquitto) +Package/lua-eco-http=$(call Package/lua-eco/Module,http/https,+lua-eco-dns +lua-eco-ssl +lua-eco-base64 +lua-eco-log) +Package/lua-eco-mqtt=$(call Package/lua-eco/Module,mqtt,+lua-eco-socket +lua-eco-dns +libmosquitto-ssl) Package/lua-eco-websocket=$(call Package/lua-eco/Module,websocket,+lua-eco-http +lua-eco-base64 +lua-eco-sha1) Package/lua-eco-termios=$(call Package/lua-eco/Module,termios) -Package/lua-eco-struct=$(call Package/lua-eco/Module,struct pack) Package/lua-eco-netlink=$(call Package/lua-eco/Module,netlink,+lua-eco-socket) Package/lua-eco-ip=$(call Package/lua-eco/Module,ip utils,+lua-eco-netlink) Package/lua-eco-nl80211=$(call Package/lua-eco/Module,nl80211,+lua-eco-netlink) @@ -82,7 +79,6 @@ define Package/lua-eco-ssl/config endef CMAKE_OPTIONS += \ - -DPLATFORM="openwrt" \ -DECO_UBUS_SUPPORT=O$(if $(CONFIG_PACKAGE_lua-eco-ubus),N,FF) \ -DECO_SSL_SUPPORT=O$(if $(CONFIG_PACKAGE_lua-eco-ssl),N,FF) @@ -97,116 +93,97 @@ ifneq ($(CONFIG_PACKAGE_lua-eco-ssl),) endif define Package/lua-eco/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/lua/eco/core $(1)/usr/lib/lua/eco/encoding - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eco $(1)/usr/bin - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/encoding/hex.lua $(1)/usr/lib/lua/eco/encoding - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/{time,bufio}.so $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/{time,bufio,bit,sync}.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/binary.so $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/local/lib/lua/5.3/eco/core $(1)/usr/local/lib/lua/5.3/eco/encoding + $(INSTALL_BIN) $(PKG_BUILD_DIR)/eco $(1)/usr/bin + $(INSTALL_DATA) $(PKG_BUILD_DIR)/hex.lua $(1)/usr/local/lib/lua/5.3/eco/encoding + $(INSTALL_BIN) $(PKG_BUILD_DIR)/{time,bufio,sys,file}.so $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/{time,bufio,sys,file,sync}.lua $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-log/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/log.so $(1)/usr/lib/lua/eco -endef - -define Package/lua-eco-sys/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/sys.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/sys.so $(1)/usr/lib/lua/eco/core -endef - -define Package/lua-eco-file/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/file.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/file.so $(1)/usr/lib/lua/eco/core + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/log.so $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-base64/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/encoding - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/encoding/base64.so $(1)/usr/lib/lua/eco/encoding + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/encoding + $(INSTALL_BIN) $(PKG_BUILD_DIR)/base64.so $(1)/usr/local/lib/lua/5.3/eco/encoding endef define Package/lua-eco-sha1/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/crypto - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/crypto/sha1.so $(1)/usr/lib/lua/eco/crypto + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/hash + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sha1.so $(1)/usr/local/lib/lua/5.3/eco/hash endef define Package/lua-eco-md5/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/crypto - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/crypto/md5.so $(1)/usr/lib/lua/eco/crypto + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/hash + $(INSTALL_BIN) $(PKG_BUILD_DIR)/md5.so $(1)/usr/local/lib/lua/5.3/eco/hash endef define Package/lua-eco-socket/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/socket.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/socket.so $(1)/usr/lib/lua/eco/core + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/socket.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/socket.so $(1)/usr/local/lib/lua/5.3/eco/core endef define Package/lua-eco-dns/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/dns.lua $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_DATA) $(PKG_BUILD_DIR)/dns.lua $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-ssl/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/ssl.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/ssl.so $(1)/usr/lib/lua/eco/core + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/ssl.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssl.so $(1)/usr/local/lib/lua/5.3/eco/core endef define Package/lua-eco-ubus/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/ubus.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/ubus.so $(1)/usr/lib/lua/eco/core + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/ubus.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ubus.so $(1)/usr/local/lib/lua/5.3/eco/core endef define Package/lua-eco-http/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/{url,http}.lua $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/http + $(INSTALL_DATA) $(PKG_BUILD_DIR)/http/*.lua $(1)/usr/local/lib/lua/5.3/eco/http endef define Package/lua-eco-mqtt/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/mqtt.lua $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/mqtt.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mqtt.so $(1)/usr/local/lib/lua/5.3/eco/core endef define Package/lua-eco-websocket/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/websocket.lua $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_DATA) $(PKG_BUILD_DIR)/websocket.lua $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-termios/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/termios.so $(1)/usr/lib/lua/eco -endef - -define Package/lua-eco-struct/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/struct.so $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/termios.so $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-netlink/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/{nl,genl}.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/{nl,genl}.so $(1)/usr/lib/lua/eco/core - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/rtnl.so $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/{nl,genl}.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/{nl,genl}.so $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rtnl.so $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-ip/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/ip.lua $(1)/usr/lib/lua/eco + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_DATA) $(PKG_BUILD_DIR)/ip.lua $(1)/usr/local/lib/lua/5.3/eco endef define Package/lua-eco-nl80211/install - $(INSTALL_DIR) $(1)/usr/lib/lua/eco/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/nl80211.lua $(1)/usr/lib/lua/eco - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/eco/core/nl80211.so $(1)/usr/lib/lua/eco/core + $(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3/eco/core + $(INSTALL_DATA) $(PKG_BUILD_DIR)/nl80211.lua $(1)/usr/local/lib/lua/5.3/eco + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nl80211.so $(1)/usr/local/lib/lua/5.3/eco/core endef $(eval $(call BuildPackage,lua-eco)) $(eval $(call BuildPackage,lua-eco-log)) -$(eval $(call BuildPackage,lua-eco-sys)) -$(eval $(call BuildPackage,lua-eco-file)) $(eval $(call BuildPackage,lua-eco-base64)) $(eval $(call BuildPackage,lua-eco-sha1)) $(eval $(call BuildPackage,lua-eco-md5)) -- 2.30.2