| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- include $(TOPDIR)/rules.mk
- PKG_NAME:=client2server-unified
- PKG_VERSION:=2.0.0
- PKG_RELEASE:=1
- PKG_LICENSE:=MIT
- PKG_MAINTAINER:=Luis Rosales <lrosales@techno-world.net>
- PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:=https://git3.techno-world.net/lrosales/client2server
- include $(INCLUDE_BASE)/package
- define Package/$(PKG_NAME)
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Event forwarder for OpenWrt to central server
- DESCRIPTION:=All-in-one Lua event forwarder that monitors DHCP, WAN link, and forwards to central server via WebSocket with offline buffering
- DEPENDS:=+lua +luasocket
- TITLE:=Client2Server Unified
- endef
- define Package/$(PKG_NAME)/description
- All-in-one Lua event forwarder for OpenWrt routers.
-
- Features:
- - WebSocket connection with auto-reconnect
- - Local buffer (store-and-forward while offline)
- - DHCP lease events (new/expire)
- - WAN link state monitoring
- - DHCP IP changes (new ISP detection)
- endef
- define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
- $(CP) ./src/* $(PKG_BUILD_DIR)/
- chmod +x $(PKG_BUILD_DIR)/*
- endef
- define Build/Configure
- endef
- define Build/Compile
- endef
- define Package/$(PKG_NAME)/install
- $(CP) $(PKG_BUILD_DIR)/* $(1)/usr/sbin/
- chmod +x $(1)/usr/sbin/*.lua
- # Init script
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/etc/init.d/client2server $(1)/etc/init.d/client2server
- # Config
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/etc/config/client2server $(1)/etc/config/client2server
- endef
- $(eval $(call BuildPackage,$(PKG_NAME)))
|