mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 14:13:56 +08:00
💐 Sync 2026-05-25 21:11:41
This commit is contained in:
1 parent
2a3d740df7
commit
5807ae013e
67 files changed
+18444
-16259
No files matched your search
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
# Copyright (C) 2026 jjm2473@gmail.com
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_ARCH_baidudrive:=$(ARCH)
|
||||
|
||||
PKG_NAME:=baidudrive
|
||||
PKG_VERSION:=0.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/linkease/istore-packages/releases/download/prebuilt/
|
||||
PKG_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=BaiduDrive
|
||||
DEPENDS:=@(x86_64||aarch64)
|
||||
URL:=https://github.com/linkease/istore-packages
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
BaiduDrive provides a Baidu Netdisk Web UI for iStoreOS.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/baidudrive
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/baidudrive.$(PKG_ARCH_baidudrive) $(1)/usr/sbin/baidudrive
|
||||
$(INSTALL_BIN) ./files/baidudrive.init $(1)/etc/init.d/baidudrive
|
||||
$(INSTALL_CONF) ./files/baidudrive.config $(1)/etc/config/baidudrive
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
@@ -0,0 +1,4 @@
|
||||
config baidudrive
|
||||
option 'enabled' '0'
|
||||
option 'data_dir' ''
|
||||
option 'port' '8080'
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=93
|
||||
USE_PROCD=1
|
||||
|
||||
get_config() {
|
||||
config_get_bool enabled "$1" enabled 1
|
||||
config_get data_dir "$1" data_dir ""
|
||||
config_get port "$1" port "8080"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load baidudrive
|
||||
config_foreach get_config baidudrive
|
||||
if [ "$enabled" != 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
if [ -z "$data_dir" ]; then
|
||||
logger -t baidudrive "data_dir is empty; please set option data_dir in /etc/config/baidudrive"
|
||||
return 1
|
||||
fi
|
||||
|
||||
mkdir -p "$data_dir" || return 1
|
||||
|
||||
logger -t baidudrive "Starting BaiduDrive Service"
|
||||
procd_open_instance baidudrive
|
||||
procd_set_param command /usr/sbin/baidudrive --port "$port" --data "$data_dir"
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "baidudrive"
|
||||
}
|
||||
Reference in new issue
Block a user