alist: Makefile: drop GOPROXY
& UPX
This commit is contained in:
parent
3a4ae78486
commit
1c3bd91a18
@ -26,10 +26,6 @@ define Download/$(PKG_NAME)-web
|
|||||||
HASH:=985049400120547e5db81d228d2492febd16d0cbb158dfb2a4149af3d6cbd253
|
HASH:=985049400120547e5db81d228d2492febd16d0cbb158dfb2a4149af3d6cbd253
|
||||||
endef
|
endef
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
|
||||||
CONFIG_ALIST_COMPRESS_GOPROXY \
|
|
||||||
CONFIG_ALIST_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
|
||||||
@ -44,38 +40,19 @@ GO_PKG_LDFLAGS_X:= \
|
|||||||
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/$(PKG_NAME)/Default
|
define Package/$(PKG_NAME)
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=Web Servers/Proxies
|
SUBMENU:=Web Servers/Proxies
|
||||||
TITLE:=Alist - Main program
|
TITLE:=A file list program that supports multiple storage
|
||||||
URL:=https://alist-doc.nn.ci/
|
URL:=https://alist-doc.nn.ci/
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/description
|
|
||||||
A file list program that supports multiple storage
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/$(PKG_NAME)
|
|
||||||
$(call Package/alist/Default)
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/config
|
define Package/$(PKG_NAME)/description
|
||||||
config ALIST_COMPRESS_UPX
|
A file list program that supports multiple storage, powered by Gin and Solidjs.
|
||||||
bool "Compress executable files with UPX"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ALIST_COMPRESS_GOPROXY
|
|
||||||
bool "Compiling with GOPROXY proxy"
|
|
||||||
default n
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(CONFIG_ALIST_COMPRESS_GOPROXY),y)
|
|
||||||
export GO111MODULE=on
|
|
||||||
export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
$(eval $(call Download,$(PKG_NAME)-web))
|
$(eval $(call Download,$(PKG_NAME)-web))
|
||||||
@ -83,17 +60,10 @@ define Build/Prepare
|
|||||||
$(CP) ./files/assets/. $(PKG_BUILD_DIR)/public/dist/assets/
|
$(CP) ./files/assets/. $(PKG_BUILD_DIR)/public/dist/assets/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(call GoPackage/Build/Compile)
|
|
||||||
ifneq ($(CONFIG_ALIST_COMPRESS_UPX),)
|
|
||||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/alist
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/install
|
define Package/$(PKG_NAME)/install
|
||||||
|
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/alist $(1)/usr/bin
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alist $(1)/usr/bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
|
||||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||||
|
Loading…
Reference in New Issue
Block a user