From 0d8fc4124cf60cce3133a8dcc218411c8ce9565b Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 25 Mar 2023 07:46:40 +0100 Subject: [PATCH] znc: add push external module Add push external module. This is very useful for an IRC Bounder as this module permits to register various services and receive a push notification on the registered service. One example is attaching a telegram bot and receive notification on your phone when an user tags you in one of the connected channels. Bump and drop AUTORELEASE from PKG_RELEASE since we are adding a new module. Signed-off-by: Christian Marangi --- net/znc/Makefile | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/net/znc/Makefile b/net/znc/Makefile index a12c582bea..e2528909d3 100644 --- a/net/znc/Makefile +++ b/net/znc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=znc PKG_VERSION:=1.8.2 -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://znc.in/releases \ @@ -171,6 +171,42 @@ define Prepare/znc-playback $(LN) $(PKG_BUILD_DIR)/znc-mod-playback/playback.cpp $(PKG_BUILD_DIR)/modules/playback.cpp endef +define push + define Package/znc-mod-push + $(Package/znc/default) + TITLE+= (push plugin) + DEPENDS:=znc + endef + + define Package/znc-mod-push/description + Send push notification to connected and configured devices. Refer to project Documentation + on how to setup. + endef + + define Package/znc-mod-push/install + $(INSTALL_DIR) $$(1)/usr/lib/znc/ + $(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/znc/push.so $$(1)/usr/lib/znc/ + endef + + ZNC_MODULES += znc-mod-push + $(if $(CONFIG_PACKAGE_znc-mod-push),ZNC_MODULE_TARGETS += push.so) +endef + +define Download/znc-push + VERSION:=23d84678de2696e0b1f51aa5074764d29a98d37b + SUBDIR:=znc-mod-push + FILE:=znc-push-$$(VERSION).tar.xz + URL:=https://github.com/amyreese/znc-push.git + MIRROR_HASH:=b1ec076ee8a37b8ff8cb530852d7639fbfce3df4a963cae29375056382020394 + PROTO:=git +endef + +define Prepare/znc-push + $(eval $(Download/znc-push)) + xzcat $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) + $(LN) $(PKG_BUILD_DIR)/znc-mod-push/push.cpp $(PKG_BUILD_DIR)/modules/push.cpp +endef + , := , $(eval $(call module,adminlog,Log user connects and disconnects and failed \ @@ -296,6 +332,7 @@ $(eval $(call module,watch,Monitor activity for specific text patterns from \ specific users and have the text sent to a special query window.)) $(eval $(call playback)) +$(eval $(call push)) $(eval $(call webadmin)) @@ -327,6 +364,11 @@ ifneq ($(CONFIG_PACKAGE_znc-mod-playback),) $(eval $(call Download,znc-playback)) $(Prepare/znc-playback) endif + +ifneq ($(CONFIG_PACKAGE_znc-mod-push),) + $(eval $(call Download,znc-push)) + $(Prepare/znc-push) +endif endef $(eval $(call BuildPackage,znc)) -- 2.30.2