mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 13:05:13 +08:00
🐤 Sync 2026-07-30 00:01:42
This commit is contained in:
1 parent
93288fe344
commit
c7db60401c
34 files changed
+472
-290
No files matched your search
+4
-7
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=openlist2
|
||||
PKG_VERSION:=4.2.4
|
||||
PKG_WEB_VERSION:=4.2.4
|
||||
PKG_RELEASE:=11
|
||||
PKG_RELEASE:=12
|
||||
|
||||
PKG_SOURCE:=openlist-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/OpenListTeam/OpenList/tar.gz/v$(PKG_VERSION)?
|
||||
@@ -28,7 +28,7 @@ define Download/openlist-frontend
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host fuse
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
@@ -42,8 +42,9 @@ GO_PKG_LDFLAGS:= \
|
||||
-X '$(GO_PKG)/internal/conf.GitCommit=tarball/$(shell echo $(PKG_HASH) | cut -c 1-7)' \
|
||||
-X '$(GO_PKG)/internal/conf.Version=v$(PKG_VERSION) (OpenWrt $(ARCH_PACKAGES))' \
|
||||
-X '$(GO_PKG)/internal/conf.WebVersion=v$(PKG_WEB_VERSION)'
|
||||
GO_PKG_EXCLUDES:=internal/fuse
|
||||
ifneq ($(CONFIG_ARCH_64BIT),y)
|
||||
GO_PKG_EXCLUDES:=drivers/lark
|
||||
GO_PKG_EXCLUDES+=drivers/lark
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@@ -75,10 +76,6 @@ ifeq ($(ARCH),arm)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_USE_MUSL),)
|
||||
TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
mkdir -p $(PKG_BUILD_DIR)/public/dist
|
||||
|
||||
@@ -76,3 +76,4 @@ config openlist2
|
||||
option enable_pasv_conn_ip_check '1'
|
||||
option sftp '0'
|
||||
option sftp_port '5222'
|
||||
option mcp '0'
|
||||
@@ -184,6 +184,9 @@ get_config() {
|
||||
config_get sftp "$1" sftp 0
|
||||
config_get sftp_port "$1" sftp_port 5222
|
||||
|
||||
# mcp
|
||||
config_get mcp "$1" mcp 0
|
||||
|
||||
# init jwt_secret
|
||||
if [ -z "$jwt_secret" ]; then
|
||||
jwt_secret=$(tr -cd "a-zA-Z0-9" < "/dev/urandom" | head -c16)
|
||||
@@ -419,6 +422,11 @@ start_service() {
|
||||
json_add_string "listen" ":$sftp_port"
|
||||
json_close_object
|
||||
|
||||
# mcp
|
||||
json_add_object "mcp"
|
||||
json_add_boolean "enable" "$mcp"
|
||||
json_close_object
|
||||
|
||||
json_add_string "last_launched_version" "$last_launched_version"
|
||||
json_add_string "proxy_address" "$proxy_address"
|
||||
|
||||
|
||||
Reference in new issue
Block a user