Compare commits
6 Commits
dev-2025-0
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fe4743c770 | ||
![]() |
dcdb24e7a2 | ||
![]() |
632788cf4b | ||
![]() |
022aab507a | ||
![]() |
0171d061af | ||
![]() |
0f829ca414 |
@ -47,8 +47,13 @@
|
|||||||
|
|
||||||
- Install `curl` package
|
- Install `curl` package
|
||||||
```shell
|
```shell
|
||||||
|
# for opkg package manager (openwrt 21.02 ~ 24.10)
|
||||||
opkg update
|
opkg update
|
||||||
opkg install curl
|
opkg install curl
|
||||||
|
|
||||||
|
# for apk package manager
|
||||||
|
apk update
|
||||||
|
apk add curl
|
||||||
```
|
```
|
||||||
|
|
||||||
- Execute install script (Multi-architecture support)
|
- Execute install script (Multi-architecture support)
|
||||||
@ -63,4 +68,4 @@
|
|||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||

|

|
||||||
|
22
install.sh
22
install.sh
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Define color codes and output functions
|
# Define color codes and output functions
|
||||||
@ -37,9 +38,11 @@ DISTRIB_ARCH="${DISTRIB_ARCH:-unknown}"
|
|||||||
# Detect package manager and set SDK version
|
# Detect package manager and set SDK version
|
||||||
if [ -x "/usr/bin/apk" ]; then
|
if [ -x "/usr/bin/apk" ]; then
|
||||||
PKG_MANAGER="apk"
|
PKG_MANAGER="apk"
|
||||||
|
PKG_OPT="add --allow-untrusted"
|
||||||
SDK="SNAPSHOT"
|
SDK="SNAPSHOT"
|
||||||
elif command -v opkg >/dev/null 2>&1; then
|
elif command -v opkg >/dev/null 2>&1; then
|
||||||
PKG_MANAGER="opkg"
|
PKG_MANAGER="opkg"
|
||||||
|
PKG_OPT="install --force-downgrade"
|
||||||
SDK="openwrt-24.10"
|
SDK="openwrt-24.10"
|
||||||
else
|
else
|
||||||
msg_red "No supported package manager found."
|
msg_red "No supported package manager found."
|
||||||
@ -129,15 +132,26 @@ if ! curl --connect-timeout 5 -m 300 -kLo "$TEMP_DIR/$PKG_FILE" "$PKG_URL"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Stop openlist service
|
||||||
|
if [ -x "/etc/init.d/openlist" ]; then
|
||||||
|
/etc/init.d/openlist stop || true
|
||||||
|
fi
|
||||||
|
|
||||||
# Extract and install packages
|
# Extract and install packages
|
||||||
msg_green "Installing Packages ..."
|
msg_green "Installing Packages ..."
|
||||||
tar -zxf "$TEMP_DIR/$PKG_FILE" -C "$TEMP_DIR/"
|
tar -zxf "$TEMP_DIR/$PKG_FILE" -C "$TEMP_DIR/"
|
||||||
for pkg in "$TEMP_DIR"/packages_ci/openlist*.ipk \
|
for pkg in "$TEMP_DIR"/packages_ci/openlist*.* \
|
||||||
"$TEMP_DIR"/packages_ci/luci-app-openlist*.ipk \
|
"$TEMP_DIR"/packages_ci/luci-app-openlist*.* \
|
||||||
"$TEMP_DIR"/packages_ci/luci-i18n-openlist-zh-cn*.ipk; do
|
"$TEMP_DIR"/packages_ci/luci-i18n-openlist-zh-cn*.*; do
|
||||||
[ -f "$pkg" ] && $PKG_MANAGER install "$pkg"
|
[ -f "$pkg" ] && $PKG_MANAGER $PKG_OPT $pkg
|
||||||
done
|
done
|
||||||
|
|
||||||
# Clean up temporary files and finish
|
# Clean up temporary files and finish
|
||||||
rm -rf /tmp/luci-*
|
rm -rf /tmp/luci-*
|
||||||
|
|
||||||
|
# Start openlist service
|
||||||
|
if [ -x "/etc/init.d/openlist" ]; then
|
||||||
|
/etc/init.d/openlist start || true
|
||||||
|
fi
|
||||||
|
|
||||||
msg_green "Done!"
|
msg_green "Done!"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-openlist
|
PKG_NAME:=luci-app-openlist
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for openlist
|
LUCI_TITLE:=LuCI support for openlist
|
||||||
|
@ -23,12 +23,18 @@ function getServiceStatus() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderStatus(isRunning, protocol, webport) {
|
function renderStatus(isRunning, protocol, webport, site_url) {
|
||||||
var spanTemp = '<em><span style="color:%s"><strong>%s %s</strong></span></em>';
|
var spanTemp = '<em><span style="color:%s"><strong>%s %s</strong></span></em>';
|
||||||
var renderHTML;
|
var renderHTML;
|
||||||
if (isRunning) {
|
if (isRunning) {
|
||||||
var button = String.format('<input class="cbi-button-reload" type="button" style="margin-left: 50px" value="%s" onclick="window.open(\'%s//%s:%s/\')">',
|
var buttonUrl = '';
|
||||||
_('Open Web Interface'), protocol, window.location.hostname, webport);
|
if (site_url && site_url.trim() !== '') {
|
||||||
|
buttonUrl = site_url;
|
||||||
|
} else {
|
||||||
|
buttonUrl = String.format('%s//%s:%s/', protocol, window.location.hostname, webport);
|
||||||
|
}
|
||||||
|
var button = String.format('<input class="cbi-button-reload" type="button" style="margin-left: 50px" value="%s" onclick="window.open(\'%s\')">',
|
||||||
|
_('Open Web Interface'), buttonUrl);
|
||||||
renderHTML = spanTemp.format('green', 'OpenList', _('RUNNING')) + button;
|
renderHTML = spanTemp.format('green', 'OpenList', _('RUNNING')) + button;
|
||||||
} else {
|
} else {
|
||||||
renderHTML = spanTemp.format('red', 'OpenList', _('NOT RUNNING'));
|
renderHTML = spanTemp.format('red', 'OpenList', _('NOT RUNNING'));
|
||||||
@ -71,6 +77,7 @@ return view.extend({
|
|||||||
} else if (ssl === '1') {
|
} else if (ssl === '1') {
|
||||||
protocol = 'https:';
|
protocol = 'https:';
|
||||||
}
|
}
|
||||||
|
var site_url = uci.get(data[0], '@openlist[0]', 'site_url') || '';
|
||||||
|
|
||||||
m = new form.Map('openlist', _('OpenList'),
|
m = new form.Map('openlist', _('OpenList'),
|
||||||
_('A file list program that supports multiple storage.'));
|
_('A file list program that supports multiple storage.'));
|
||||||
@ -83,7 +90,7 @@ return view.extend({
|
|||||||
poll.add(function () {
|
poll.add(function () {
|
||||||
return L.resolveDefault(getServiceStatus()).then(function (res) {
|
return L.resolveDefault(getServiceStatus()).then(function (res) {
|
||||||
var view = document.getElementById('service_status');
|
var view = document.getElementById('service_status');
|
||||||
view.innerHTML = renderStatus(res, protocol, webport);
|
view.innerHTML = renderStatus(res, protocol, webport, site_url);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -7,14 +7,15 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=openlist
|
PKG_NAME:=openlist
|
||||||
PKG_WEB_VERSION:=4.0.0-rc.4
|
PKG_VERSION:=4.0.2
|
||||||
|
PKG_WEB_VERSION:=4.0.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/OpenListTeam/OpenList.git
|
PKG_SOURCE_URL:=https://codeload.github.com/OpenListTeam/OpenList/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_SOURCE_DATE:=2025-06-19
|
PKG_HASH:=d6e7ca46748b1b1d21ff28850f5b25112930d3d2c211e8b9cec1041cbd3523d5
|
||||||
PKG_SOURCE_VERSION:=70b937e031677cdefe97b39a99fcbb7c8d1650a9
|
|
||||||
PKG_MIRROR_HASH:=47169c8e122eeb26b7672ec982767c1e67d2fcc5aab82d82912e6fdb71fbdd08
|
PKG_BUILD_DIR:=$(BUILD_DIR)/OpenList-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0
|
PKG_LICENSE:=GPL-3.0
|
||||||
PKG_LICENSE_FILE:=LICENSE
|
PKG_LICENSE_FILE:=LICENSE
|
||||||
@ -23,7 +24,7 @@ PKG_MAINTAINER:=sbwml <admin@cooluc.com>
|
|||||||
define Download/openlist-frontend
|
define Download/openlist-frontend
|
||||||
FILE:=openlist-frontend-dist-v$(PKG_WEB_VERSION).tar.gz
|
FILE:=openlist-frontend-dist-v$(PKG_WEB_VERSION).tar.gz
|
||||||
URL:=https://github.com/OpenListTeam/OpenList-Frontend/releases/download/v$(PKG_WEB_VERSION)/
|
URL:=https://github.com/OpenListTeam/OpenList-Frontend/releases/download/v$(PKG_WEB_VERSION)/
|
||||||
HASH:=cfed3dff5001df22f7a0ae679c48270fbaf8bf77694f33694a235276c265eacf
|
HASH:=f28d15059918dbaf4a0da2f2d92b4a956b46019d321f567217ad4318076c2462
|
||||||
endef
|
endef
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
PKG_BUILD_DEPENDS:=golang/host
|
||||||
@ -36,8 +37,8 @@ GO_PKG_LDFLAGS:= \
|
|||||||
-X '$(GO_PKG)/internal/conf.BuiltAt=$(shell date '+%Y-%m-%d %H:%M:%S %z')' \
|
-X '$(GO_PKG)/internal/conf.BuiltAt=$(shell date '+%Y-%m-%d %H:%M:%S %z')' \
|
||||||
-X '$(GO_PKG)/internal/conf.GoVersion=$(shell $(STAGING_DIR_HOSTPKG)/bin/go version | sed 's/go version //')' \
|
-X '$(GO_PKG)/internal/conf.GoVersion=$(shell $(STAGING_DIR_HOSTPKG)/bin/go version | sed 's/go version //')' \
|
||||||
-X '$(GO_PKG)/internal/conf.GitAuthor=The OpenList Projects Contributors <noreply@openlist.team>' \
|
-X '$(GO_PKG)/internal/conf.GitAuthor=The OpenList Projects Contributors <noreply@openlist.team>' \
|
||||||
-X '$(GO_PKG)/internal/conf.GitCommit=$(shell echo $(PKG_SOURCE_VERSION) | cut -c 1-7)' \
|
-X '$(GO_PKG)/internal/conf.GitCommit=tarball/$(shell echo $(PKG_HASH) | cut -c 1-7)' \
|
||||||
-X '$(GO_PKG)/internal/conf.Version=$(PKG_SOURCE_DATE) (OpenWrt $(ARCH_PACKAGES))' \
|
-X '$(GO_PKG)/internal/conf.Version=v$(PKG_VERSION) (OpenWrt $(ARCH_PACKAGES))' \
|
||||||
-X '$(GO_PKG)/internal/conf.WebVersion=v$(PKG_WEB_VERSION)'
|
-X '$(GO_PKG)/internal/conf.WebVersion=v$(PKG_WEB_VERSION)'
|
||||||
ifneq ($(CONFIG_ARCH_64BIT),y)
|
ifneq ($(CONFIG_ARCH_64BIT),y)
|
||||||
GO_PKG_EXCLUDES:=drivers/lark
|
GO_PKG_EXCLUDES:=drivers/lark
|
||||||
|
Loading…
x
Reference in New Issue
Block a user