mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-05 09:54:11 +08:00
update 2026-09-05 15:59:29
This commit is contained in:
1 parent
440cac507b
commit
2cd4730a13
2 files changed
+70
-17
No files matched your search
@@ -49,17 +49,24 @@ return view.extend({
|
|||||||
s = m.section(form.TypedSection);
|
s = m.section(form.TypedSection);
|
||||||
s.anonymous = true;
|
s.anonymous = true;
|
||||||
s.render = function() {
|
s.render = function() {
|
||||||
poll.add(function() {
|
poll.add(function() {
|
||||||
return Promise.resolve().then(function() {
|
return fs.stat('/var/run/filebrowser.pid').then(function(stat) {
|
||||||
let view = document.getElementById('service_status');
|
let view = document.getElementById('service_status');
|
||||||
view.innerHTML = renderStatus(data.isRunning, webport);
|
if (view) {
|
||||||
});
|
view.innerHTML = renderStatus(stat, webport);
|
||||||
});
|
}
|
||||||
|
}).catch(function() {
|
||||||
|
let view = document.getElementById('service_status');
|
||||||
|
if (view) {
|
||||||
|
view.innerHTML = renderStatus(null, webport);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
|
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
|
||||||
E('p', { id: 'service_status' }, _('Collecting data...'))
|
E('p', { id: 'service_status' }, _('Collecting data...'))
|
||||||
]);
|
]);
|
||||||
}
|
};
|
||||||
|
|
||||||
s = m.section(form.NamedSection, 'config', 'filebrowser');
|
s = m.section(form.NamedSection, 'config', 'filebrowser');
|
||||||
|
|
||||||
@@ -75,10 +82,6 @@ return view.extend({
|
|||||||
o = s.option(form.Value, 'root_path', _('Root directory'));
|
o = s.option(form.Value, 'root_path', _('Root directory'));
|
||||||
o.default = '/';
|
o.default = '/';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
o = s.option(form.Value, 'base_url', _('Base url'));
|
|
||||||
o.default = '/';
|
|
||||||
o.rmempty = false;
|
|
||||||
|
|
||||||
return m.render();
|
return m.render();
|
||||||
}
|
}
|
||||||
|
|||||||
+53
-3
@@ -37,12 +37,36 @@ endif
|
|||||||
|
|
||||||
PKG_NAME:=pgyvpn
|
PKG_NAME:=pgyvpn
|
||||||
PKG_VERSION:=3.1.0
|
PKG_VERSION:=3.1.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=pgyvpnsvr
|
PKG_SOURCE:=pgyvpnsvr
|
||||||
PKG_SOURCE_URL:=https://mirrors.oray.com/orayos/packages/$(PKG_NAME)/$(PKG_ARCH_PGYYPN)/$(PKG_VERSION)/bin
|
PKG_SOURCE_URL:=https://mirrors.oray.com/orayos/packages/$(PKG_NAME)/$(PKG_ARCH_PGYYPN)/$(PKG_VERSION)/bin
|
||||||
PKG_HASH:=skip
|
PKG_HASH:=skip
|
||||||
|
|
||||||
|
OPENSSL_COMPAT_VERSION:=1.1.1w
|
||||||
|
OPENSSL_COMPAT_SOURCE:=openssl-$(OPENSSL_COMPAT_VERSION).tar.gz
|
||||||
|
OPENSSL_COMPAT_HASH:=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
|
||||||
|
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-generic32
|
||||||
|
ifeq ($(ARCH),arm)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-armv4
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),aarch64)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-aarch64
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),mips)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-mips32
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),mipsel)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-mips32
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),i386)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-x86
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
OPENSSL_COMPAT_TARGET:=linux-x86_64
|
||||||
|
endif
|
||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
PKG_MAINTAINER:=Oray <developer@oray.com>
|
PKG_MAINTAINER:=Oray <developer@oray.com>
|
||||||
|
|
||||||
@@ -53,7 +77,7 @@ define Package/pgyvpn
|
|||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=VPN
|
SUBMENU:=VPN
|
||||||
DEPENDS:=@(arm||aarch64||mips||mipsel||i386||x86_64) \
|
DEPENDS:=@(arm||aarch64||mips||mipsel||i386||x86_64) \
|
||||||
+iptables +libc +libopenssl +librt \
|
+iptables +libc +librt \
|
||||||
+libpthread +libstdcpp +kmod-tun
|
+libpthread +libstdcpp +kmod-tun
|
||||||
TITLE:=PuGongYing VPN, Fast networking
|
TITLE:=PuGongYing VPN, Fast networking
|
||||||
URL:=https://pgy.oray.com/
|
URL:=https://pgy.oray.com/
|
||||||
@@ -69,16 +93,39 @@ define Download/extra
|
|||||||
URL:=$(PKG_SOURCE_URL)
|
URL:=$(PKG_SOURCE_URL)
|
||||||
HASH:=skip
|
HASH:=skip
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Download/openssl-compat
|
||||||
|
FILE:=$(OPENSSL_COMPAT_SOURCE)
|
||||||
|
URL:=https://www.openssl.org/source/old/1.1.1
|
||||||
|
HASH:=$(OPENSSL_COMPAT_HASH)
|
||||||
|
endef
|
||||||
$(eval $(call Download,extra))
|
$(eval $(call Download,extra))
|
||||||
|
$(eval $(call Download,openssl-compat))
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(OPENSSL_COMPAT_SOURCE)
|
||||||
mv $(DL_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(PKG_BUILD_DIR)
|
mv $(DL_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(PKG_BUILD_DIR)
|
||||||
chmod +x $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr}
|
chmod +x $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr}
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
( cd $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION) && \
|
||||||
|
CC="$(TARGET_CC)" \
|
||||||
|
./Configure $(OPENSSL_COMPAT_TARGET) \
|
||||||
|
--prefix=/usr \
|
||||||
|
--libdir=lib \
|
||||||
|
--cross-compile-prefix="$(TARGET_CROSS)" \
|
||||||
|
shared no-tests no-engine no-async no-comp no-asm \
|
||||||
|
$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
true
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION) \
|
||||||
|
CC="$(TARGET_CC)" \
|
||||||
|
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||||
|
build_libs
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/pgyvpn/install
|
define Package/pgyvpn/install
|
||||||
@@ -87,8 +134,11 @@ define Package/pgyvpn/install
|
|||||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_DIR) $(1)/usr/share/pgyvpn
|
$(INSTALL_DIR) $(1)/usr/share/pgyvpn
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(1)/usr/sbin
|
$(CP) $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(1)/usr/sbin
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION)/libssl.so.1.1 $(1)/usr/lib
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION)/libcrypto.so.1.1 $(1)/usr/lib
|
||||||
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d
|
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d
|
||||||
$(INSTALL_CONF) ./files/etc/config/* $(1)/etc/config
|
$(INSTALL_CONF) ./files/etc/config/* $(1)/etc/config
|
||||||
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/* $(1)/etc/hotplug.d/iface
|
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/* $(1)/etc/hotplug.d/iface
|
||||||
|
|||||||
Reference in new issue
Block a user