🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+76
View File
@@ -0,0 +1,76 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=pikpak-webdav
PKG_VERSION:=0.0.3
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_MAINTAINER:=ykxVK8yL5L
PKG_LIBC:=musl
ifeq ($(ARCH),arm)
PKG_LIBC:=musleabi
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
ifneq ($(filter $(ARM_CPU_FEATURES),vfp vfpv2),)
PKG_LIBC:=musleabihf
endif
endif
PKG_ARCH=$(ARCH)
ifeq ($(ARCH),i386)
PKG_ARCH:=i686
endif
PKG_SOURCE:=pikpak-webdav-v$(PKG_VERSION).$(PKG_ARCH)-unknown-linux-$(PKG_LIBC).tar.gz
PKG_SOURCE_URL:=https://github.com/ykxVK8yL5L/pikpak-webdav/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=WebDAV server for Pikpak
URL:=https://github.com/ykxVK8yL5L/pikpak-webdav
endef
define Package/$(PKG_NAME)/description
WebDAV server for Pikpak.
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/pikpak-webdav
endef
define Download/sha256sum
FILE:=$(PKG_SOURCE).sha256
URL_FILE:=$(FILE)
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
$(eval $(call Download,sha256sum))
define Build/Prepare
mv $(DL_DIR)/$(PKG_SOURCE).sha256 .
cp $(DL_DIR)/$(PKG_SOURCE) .
shasum -a 256 -c $(PKG_SOURCE).sha256
rm $(PKG_SOURCE).sha256 $(PKG_SOURCE)
tar -C $(PKG_BUILD_DIR)/ -zxf $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Compile
echo "$(PKG_NAME) using precompiled binary."
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pikpak-webdav $(1)/usr/bin/pikpak-webdav
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/pikpak-webdav.init $(1)/etc/init.d/pikpak-webdav
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/pikpak-webdav.config $(1)/etc/config/pikpak-webdav
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
+15
View File
@@ -0,0 +1,15 @@
config server
option enable '0'
option debug '0'
option pikpak_user ''
option pikpak_password ''
option host '0.0.0.0'
option port '9867'
option auth_user ''
option auth_password ''
option proxy_url ''
option read_buffer_size '10485760'
option write_buffer_size '16777216'
option cache_size '1000'
option cache_ttl '600'
option root '/'
+58
View File
@@ -0,0 +1,58 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=15
NAME=pikpak-webdav
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
start_service() {
local enable=$(uci_get_by_type server enable)
case "$enable" in
1|on|true|yes|enabled)
local pikpak_user=$(uci_get_by_type server pikpak_user)
local pikpak_password=$(uci_get_by_type server pikpak_password)
local auth_user=$(uci_get_by_type server auth_user)
local auth_password=$(uci_get_by_type server auth_password)
local proxy_url=$(uci_get_by_type server proxy_url)
local read_buf_size=$(uci_get_by_type server read_buffer_size 10485760)
local upload_buffer_size=$(uci_get_by_type server upload_buffer_size 16777216)
local cache_size=$(uci_get_by_type server cache_size 1000)
local cache_ttl=$(uci_get_by_type server cache_ttl 600)
local host=$(uci_get_by_type server host 127.0.0.1)
local port=$(uci_get_by_type server port 9867)
local root=$(uci_get_by_type server root /)
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME --host $host --port $port --root $root -S $read_buf_size --upload-buffer-size $upload_buffer_size --cache-size $cache_size --cache-ttl $cache_ttl --proxy-url $proxy_url --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"
procd_set_param pidfile /var/run/$NAME.pid
procd_append_param env PIKPAK_USER="$pikpak_user"
procd_append_param env PIKPAK_PASSWORD="$pikpak_password"
[[ ! -z "$auth_user" ]] && procd_append_param env WEBDAV_AUTH_USER="$auth_user"
[[ ! -z "$auth_password" ]] && procd_append_param env WEBDAV_AUTH_PASSWORD="$auth_password"
case $(uci_get_by_type server debug) in
1|on|true|yes|enabled)
procd_append_param env RUST_LOG="pikpak_webdav=debug" ;;
*) ;;
esac
procd_close_instance ;;
*)
stop_service ;;
esac
}
service_triggers() {
procd_add_reload_trigger "pikpak-webdav"
}
reload_service() {
restart
}