mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
nps: update to to 0.26.10 (#7778)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com> Co-authored-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
20394f4491
commit
f5cb3a0af4
@ -1,79 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=npc
|
||||
PKG_VERSION:=0.26.9
|
||||
PKG_RELEASE:=1
|
||||
|
||||
ifeq ($(ARCH),mipsel)
|
||||
NPC_ARCH:=mipsle
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
NPC_ARCH:=mips
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
NPC_ARCH:=386
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
NPC_ARCH:=amd64
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
NPC_ARCH:=arm_v7
|
||||
ifeq ($(BOARD),bcm53xx)
|
||||
NPC_ARCH:=arm_v6
|
||||
endif
|
||||
ifeq ($(BOARD),kirkwood)
|
||||
NPC_ARCH:=arm_v5
|
||||
endif
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
NPC_ARCH:=arm64
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/npc-$(PKG_VERSION)
|
||||
PKG_URL:=https://github.com/ehang-io/nps/releases/download/v$(PKG_VERSION)/linux_$(NPC_ARCH)_client.tar.gz
|
||||
PKG_FILE:=nps_linux_$(NPC_ARCH)_client-$(PKG_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=NPC Client
|
||||
DEPENDS:=
|
||||
URL:=https://github.com/ehang-io/nps/releases
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
npc is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet
|
||||
endef
|
||||
|
||||
define Build/Download
|
||||
if [ ! -f $(DL_DIR)/$(PKG_FILE) ] ; then \
|
||||
wget -c -t 5 -O $(DL_DIR)/$(PKG_FILE) $(PKG_URL); \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(Build/Download)
|
||||
tar -zxvf $(DL_DIR)/$(PKG_FILE) -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/npc $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
87
package/lean/nps/Makefile
Normal file
87
package/lean/nps/Makefile
Normal file
@ -0,0 +1,87 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nps
|
||||
PKG_VERSION:=0.26.10
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ehang-io/nps/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1b2fe9d251f55105d65027a1cee464f65d2f6ab3bd4a20e4655e5135db68aee7
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINTER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_NPC_COMPRESS_UPX \
|
||||
CONFIG_NPS_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=ehang.io/nps
|
||||
GO_PKG_BUILD_PKG:=ehang.io/nps/cmd/...
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/nps/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=A intranet penetration proxy server ($(1))
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
URL:=https://ehang-io.github.io/nps
|
||||
endef
|
||||
|
||||
Package/npc = $(call Package/nps/template,client)
|
||||
Package/nps = $(call Package/nps/template,server)
|
||||
|
||||
define Package/nps/description/template
|
||||
NPS is a lightweight, high-performance, powerful intranet penetration proxy server,
|
||||
with a powerful web management terminal.
|
||||
endef
|
||||
|
||||
Package/npc/description = $(Package/nps/description/template)
|
||||
Package/nps/description = $(Package/nps/description/template)
|
||||
|
||||
define Package/npc/config
|
||||
config NPC_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
define Package/nps/config
|
||||
config NPS_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifeq ($(CONFIG_NPC_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/npc
|
||||
endif
|
||||
ifeq ($(CONFIG_NPS_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/nps
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/nps/install/template
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/$(2)
|
||||
endef
|
||||
|
||||
Package/npc/install = $(call Package/nps/install/template,$(1),npc)
|
||||
Package/nps/install = $(call Package/nps/install/template,$(1),nps)
|
||||
|
||||
$(eval $(call GoBinPackage,npc))
|
||||
$(eval $(call GoBinPackage,nps))
|
||||
$(eval $(call BuildPackage,npc))
|
||||
$(eval $(call BuildPackage,nps))
|
@ -0,0 +1,4 @@
|
||||
diff --git a/cmd/npc/sdk.go b/cmd/npc/sdk.go.bak
|
||||
similarity index 100%
|
||||
rename from cmd/npc/sdk.go
|
||||
rename to cmd/npc/sdk.go.bak
|
Loading…
Reference in New Issue
Block a user