mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
frp: instead of frpc and frps
This commit is contained in:
parent
6c9d459159
commit
19ec6b2511
68
package/lean/frp/Makefile
Normal file
68
package/lean/frp/Makefile
Normal file
@ -0,0 +1,68 @@
|
||||
#
|
||||
# Copyright (C) 2019 Xingwang Liao
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=frp
|
||||
PKG_VERSION:=0.31.2
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=790a18f5651cc645a3d73fc147c719f5b212fc21db0c51c620011ee836b7a28f
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/fatedier/frp
|
||||
GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
|
||||
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define frp/templates
|
||||
define Package/$(1)
|
||||
TITLE:=A fast reverse proxy ($(1))
|
||||
URL:=https://github.com/fatedier/frp
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
DEPENDS:=$$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/$(1)/description
|
||||
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall
|
||||
to the internet. As of now, it supports tcp & udp, as well as httpand https protocols,
|
||||
where requests can be forwarded to internal services by domain name.
|
||||
|
||||
This package contains the $(1).
|
||||
endef
|
||||
|
||||
define Package/$(1)/install
|
||||
$$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(PKG_INSTALL_DIR)/usr/bin/$(1)
|
||||
|
||||
$$(INSTALL_DIR) $$(1)/usr/bin
|
||||
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/
|
||||
endef
|
||||
endef
|
||||
|
||||
FRP_COMPONENTS:=frpc frps
|
||||
|
||||
$(foreach component,$(FRP_COMPONENTS), \
|
||||
$(eval $(call frp/templates,$(component))) \
|
||||
$(eval $(call GoBinPackage,$(component))) \
|
||||
$(eval $(call BuildPackage,$(component))) \
|
||||
)
|
@ -1,70 +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:=frpc
|
||||
PKG_VERSION:=0.31.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
ifeq ($(ARCH),mipsel)
|
||||
FRPC_ARCH:=mipsle
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
FRPC_ARCH:=mips
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
FRPC_ARCH:=386
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
FRPC_ARCH:=amd64
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
FRPC_ARCH:=arm
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
FRPC_ARCH:=arm64
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/fatedier/frp/releases/download/v$(PKG_VERSION)
|
||||
PKG_SOURCE:=frp_$(PKG_VERSION)_linux_$(FRPC_ARCH).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/frp_$(PKG_VERSION)_linux_$(FRPC_ARCH)
|
||||
PKG_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=FRPC Client
|
||||
DEPENDS:=
|
||||
URL:=https://github.com/fatedier/frp/releases
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(PKG_UNPACK)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/frpc $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
@ -1,70 +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:=frps
|
||||
PKG_VERSION:=0.31.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
ifeq ($(ARCH),mipsel)
|
||||
FRPC_ARCH:=mipsle
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
FRPC_ARCH:=mips
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
FRPC_ARCH:=386
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
FRPC_ARCH:=amd64
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
FRPC_ARCH:=arm
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
FRPC_ARCH:=arm64
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/fatedier/frp/releases/download/v$(PKG_VERSION)
|
||||
PKG_SOURCE:=frp_$(PKG_VERSION)_linux_$(FRPC_ARCH).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/frp_$(PKG_VERSION)_linux_$(FRPC_ARCH)
|
||||
PKG_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=FRPC Client
|
||||
DEPENDS:=
|
||||
URL:=https://github.com/fatedier/frp/releases
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(PKG_UNPACK)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/frps $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
Loading…
Reference in New Issue
Block a user