alist: disable firewall rule by default; optimize makefile
This commit is contained in:
parent
c9c72074a4
commit
0b7c918098
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=alist
|
PKG_NAME:=alist
|
||||||
PKG_VERSION:=2.6.1
|
PKG_VERSION:=2.6.1
|
||||||
PKG_WEB_VERSION:=2.6.0
|
PKG_WEB_VERSION:=2.6.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?
|
||||||
@ -21,9 +21,9 @@ PKG_MAINTAINER:=sbwml <admin@cooluc.com>
|
|||||||
|
|
||||||
define Download/$(PKG_NAME)-web
|
define Download/$(PKG_NAME)-web
|
||||||
FILE:=$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz
|
FILE:=$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz
|
||||||
URL_FILE:=$(PKG_WEB_VERSION).tar.gz
|
URL_FILE:=dist.tar.gz
|
||||||
URL:=https://github.com/alist-org/alist-web/archive/refs/tags/
|
URL:=https://github.com/alist-org/alist-web/releases/download/$(PKG_WEB_VERSION)/
|
||||||
HASH:=a0a18b3329596d149ac0598c8aa5328d0dd42fb41c2f6b1b0182ebde205b69f2
|
HASH:=d11099a302cf2c4be54f56c79aa77838c4d1ede487bc42f0c8a6cca9588971f2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:=CONFIG_ALIST_COMPRESS_UPX
|
PKG_CONFIG_DEPENDS:=CONFIG_ALIST_COMPRESS_UPX
|
||||||
@ -77,19 +77,13 @@ endef
|
|||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
|
$(eval $(call Download,$(PKG_NAME)-web))
|
||||||
|
$(TAR) --strip-components=1 -C $(PKG_BUILD_DIR)/public -xzf $(DL_DIR)/$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz
|
||||||
|
$(CP) ./files/assets/. $(PKG_BUILD_DIR)/public/assets/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
( \
|
$(call GoPackage/Build/Compile)
|
||||||
pushd $(PKG_BUILD_DIR) ; \
|
|
||||||
tar -zxvf $(DL_DIR)/$(PKG_NAME)-web-$(PKG_WEB_VERSION).tar.gz -C ./ ; \
|
|
||||||
cd alist-web-$(PKG_WEB_VERSION) ; \
|
|
||||||
yarn && yarn build ; \
|
|
||||||
cp -ax dist/* ../public/ ; \
|
|
||||||
cp -ax $(CURDIR)/files/assets/* ../public/assets/ ; \
|
|
||||||
popd ; \
|
|
||||||
$(call GoPackage/Build/Compile) ; \
|
|
||||||
)
|
|
||||||
ifneq ($(CONFIG_ALIST_COMPRESS_UPX),)
|
ifneq ($(CONFIG_ALIST_COMPRESS_UPX),)
|
||||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/alist
|
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/alist
|
||||||
endif
|
endif
|
||||||
@ -104,6 +98,5 @@ define Package/$(PKG_NAME)/install
|
|||||||
$(INSTALL_CONF) ./files/data.db $(1)/etc/alist/data.db
|
$(INSTALL_CONF) ./files/data.db $(1)/etc/alist/data.db
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Download,$(PKG_NAME)-web))
|
|
||||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||||
|
@ -13,10 +13,8 @@ uci -q batch <<-EOF >/dev/null
|
|||||||
set firewall.alist.src="wan"
|
set firewall.alist.src="wan"
|
||||||
set firewall.alist.proto="tcp"
|
set firewall.alist.proto="tcp"
|
||||||
set firewall.alist.dest_port="5244"
|
set firewall.alist.dest_port="5244"
|
||||||
|
set firewall.alist.enabled="0"
|
||||||
commit firewall
|
commit firewall
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
/etc/init.d/alist enable
|
|
||||||
/etc/init.d/alist start
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue
Block a user