|
@@ -17,37 +17,16 @@ PKG_LICENSE:=MIT
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
PKG_MAINTAINER:=madeye <[email protected]>
|
|
PKG_MAINTAINER:=madeye <[email protected]>
|
|
|
|
|
|
|
|
-PKG_CONFIG_DEPENDS:= \
|
|
|
|
|
- CONFIG_V2RAY_PLUGIN_COMPRESS_GOPROXY \
|
|
|
|
|
- CONFIG_V2RAY_PLUGIN_COMPRESS_UPX
|
|
|
|
|
-
|
|
|
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
PKG_USE_MIPS16:=0
|
|
PKG_USE_MIPS16:=0
|
|
|
|
|
|
|
|
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
|
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
|
|
-GO_PKG_LDFLAGS:=-s -w
|
|
|
|
|
GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION)
|
|
GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
|
|
|
|
|
|
-define Package/v2ray-plugin/config
|
|
|
|
|
-config V2RAY_PLUGIN_COMPRESS_GOPROXY
|
|
|
|
|
- bool "Compiling with GOPROXY proxy"
|
|
|
|
|
- default n
|
|
|
|
|
-
|
|
|
|
|
-config V2RAY_PLUGIN_COMPRESS_UPX
|
|
|
|
|
- bool "Compress executable files with UPX"
|
|
|
|
|
- depends on !mips64
|
|
|
|
|
- default n
|
|
|
|
|
-endef
|
|
|
|
|
-
|
|
|
|
|
-ifeq ($(CONFIG_V2RAY_PLUGIN_COMPRESS_GOPROXY),y)
|
|
|
|
|
- export GO111MODULE=on
|
|
|
|
|
- export GOPROXY=https://goproxy.bj.bcebos.com
|
|
|
|
|
-endif
|
|
|
|
|
-
|
|
|
|
|
define Package/v2ray-plugin
|
|
define Package/v2ray-plugin
|
|
|
SECTION:=net
|
|
SECTION:=net
|
|
|
CATEGORY:=Network
|
|
CATEGORY:=Network
|
|
@@ -57,12 +36,5 @@ define Package/v2ray-plugin
|
|
|
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
|
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
|
|
endef
|
|
endef
|
|
|
|
|
|
|
|
-define Build/Compile
|
|
|
|
|
- $(call GoPackage/Build/Compile)
|
|
|
|
|
-ifeq ($(CONFIG_V2RAY_PLUGIN_COMPRESS_UPX),y)
|
|
|
|
|
- $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin
|
|
|
|
|
-endif
|
|
|
|
|
-endef
|
|
|
|
|
-
|
|
|
|
|
$(eval $(call GoBinPackage,v2ray-plugin))
|
|
$(eval $(call GoBinPackage,v2ray-plugin))
|
|
|
$(eval $(call BuildPackage,v2ray-plugin))
|
|
$(eval $(call BuildPackage,v2ray-plugin))
|