mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-09 10:37:39 +08:00
🌈 Sync 2022-07-31 20:23:45
This commit is contained in:
parent
84525e9dc0
commit
4133567eb9
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=alist
|
||||
PKG_VERSION:=2.6.3
|
||||
PKG_WEB_VERSION:=2.6.2
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?
|
||||
@ -63,18 +63,6 @@ config ALIST_COMPRESS_UPX
|
||||
default n
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/alist/
|
||||
/etc/config/alist
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
[ -f /etc/uci-defaults/alist ] && /etc/uci-defaults/alist && rm -f /etc/uci-defaults/alist
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(eval $(call Download,$(PKG_NAME)-web))
|
||||
@ -90,12 +78,8 @@ endif
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/alist $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/alist $(1)/usr/bin
|
||||
$(INSTALL_CONF) ./files/alist.config $(1)/etc/config/alist
|
||||
$(INSTALL_BIN) ./files/alist.init $(1)/etc/init.d/alist
|
||||
$(INSTALL_BIN) ./files/alist.uci-default $(1)/etc/uci-defaults/alist
|
||||
$(INSTALL_CONF) ./files/data.db $(1)/etc/alist/data.db
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@alist[-1]
|
||||
add ucitrack alist
|
||||
set ucitrack.@alist[-1].init=alist
|
||||
commit ucitrack
|
||||
|
||||
delete firewall.alist
|
||||
set firewall.alist=rule
|
||||
set firewall.alist.name="alist"
|
||||
set firewall.alist.target="ACCEPT"
|
||||
set firewall.alist.src="wan"
|
||||
set firewall.alist.proto="tcp"
|
||||
set firewall.alist.dest_port="5244"
|
||||
set firewall.alist.enabled="0"
|
||||
commit firewall
|
||||
EOF
|
||||
|
||||
exit 0
|
@ -9,9 +9,19 @@ PKG_NAME:=luci-app-alist
|
||||
|
||||
LUCI_TITLE:=LuCI support for alist
|
||||
LUCI_DEPENDS:=+alist
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/alist
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
[ -n "${IPKG_INSTROOT}" ] || {
|
||||
( . /etc/uci-defaults/luci-alist ) && rm -f /etc/uci-defaults/luci-alist
|
||||
exit 0
|
||||
}
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
|
@ -6,8 +6,8 @@ function index()
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false
|
||||
entry({"admin", "nas", "alist"}, cbi("alist"), _("Alist"), 20).dependent = true
|
||||
|
||||
entry({"admin", "nas", "alist_status"}, call("alist_status"))
|
||||
end
|
||||
|
||||
|
@ -52,3 +52,5 @@ msgstr "Alist 服务未启动"
|
||||
msgid "Collecting data..."
|
||||
msgstr "收集数据..."
|
||||
|
||||
msgid "NAS"
|
||||
msgstr "网络存储"
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -f /tmp/luci-indexcache*
|
||||
exit 0
|
11
luci-app-alist/root/etc/uci-defaults/luci-alist
Executable file
11
luci-app-alist/root/etc/uci-defaults/luci-alist
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@alist[-1]
|
||||
add ucitrack alist
|
||||
set ucitrack.@alist[-1].init=alist
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -rf /tmp/luci-*
|
||||
exit 0
|
11
luci-app-alist/root/usr/share/rpcd/acl.d/luci-app-alist.json
Normal file
11
luci-app-alist/root/usr/share/rpcd/acl.d/luci-app-alist.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-alist": {
|
||||
"description": "Grant UCI access for luci-app-alist",
|
||||
"read": {
|
||||
"uci": [ "alist" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "alist" ]
|
||||
}
|
||||
}
|
||||
}
|
@ -19,13 +19,13 @@ return view.extend({
|
||||
|
||||
m = new form.Map('unblockneteasemusic');
|
||||
|
||||
s = m.section(form.TypedSection, null, _('核心管理'));
|
||||
s = m.section(form.NamedSection, 'config', 'unblockneteasemusic', _('核心管理'));
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.option(form.DummyValue, '_core_version', _('核心版本'));
|
||||
o.cfgvalue = function() {
|
||||
var _this = this;
|
||||
var spanTemp = '<span style="color:%s"><strong>%s</strong></span>';
|
||||
var spanTemp = '<div style="color:%s;margin-top:13px;margin-left:3px;"><strong>%s</strong></div>';
|
||||
|
||||
return Promise.all([
|
||||
fs.read(unm_path + '/core_local_ver'),
|
||||
|
Loading…
Reference in New Issue
Block a user