mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
baidupcs-web: add upx support (#6772)
This commit is contained in:
parent
6df341b33c
commit
cda4a4ff70
@ -20,6 +20,10 @@ PKG_MIRROR_HASH:=815410a7c348c82eea638f6d34fd4dfab59286e16b172c434ff0008de24676d
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY \
|
||||
CONFIG_BAIDUPCS_WEB_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@ -43,6 +47,21 @@ define Package/$(PKG_NAME)/description
|
||||
BaiduPCS-Web is a web controller for BaiduPCS-Go
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
config BAIDUPCS_WEB_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config BAIDUPCS_WEB_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.baidu.com
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
GOOS=$$$$(go env GOOS) GOARCH=$$$$(go env GOARCH) go get -v github.com/GeertJohan/go.rice/rice/... ; \
|
||||
@ -50,7 +69,9 @@ define Build/Compile
|
||||
"$$$$(go env GOPATH)/bin/rice" embed-go ; \
|
||||
)
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/BaiduPCS-Go
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
|
Loading…
Reference in New Issue
Block a user