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 \
$(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 \
specific users and have the text sent to a special query window.))
$(eval $(call playback))
+$(eval $(call push))
$(eval $(call webadmin))
$(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))