summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-19 11:55:29 +0800
committerzxp198210052023-12-19 11:55:29 +0800
commit9ab7bcd624b40e3fcbdd1554ad1008fce95a889e (patch)
tree7f48976f999b0021199e8b2f27d9c84a7e34e67e
parent113554e09bd57f5a6be612300e0500890b8f1be2 (diff)
downloadaur-9ab7bcd624b40e3fcbdd1554ad1008fce95a889e.tar.gz
fix errors
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD12
-rw-r--r--aechoterm.sh20
3 files changed, 21 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 964ca3c6d291..94aedb819463 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -15,7 +15,7 @@ pkgbase = aechoterm-bin
provides = aechoterm=4.0.1
conflicts = aechoterm
source = aechoterm.sh
- sha256sums = d07e498ef8c07e15f5dfcf186b710b21c24726bb1ba48d024d99fd03814e0797
+ sha256sums = 68521cf799a902fb3c86aa1ebdcfa92566ee49621b0e1db5873a0501d893b2e6
source_aarch64 = aechoterm-4.0.1-aarch64.deb::https://ec.cnd.nantiangzzx.com/Aechoterm_4.0.1_arm64.deb
sha256sums_aarch64 = 5ad55272b26a667cfcca3cc8c31b0afdabae8c718694b645cb19c83dc7387838
source_x86_64 = aechoterm-4.0.1-x86_64.deb::https://ec.cnd.nantiangzzx.com/Aechoterm_4.0.1_amd64.deb
diff --git a/PKGBUILD b/PKGBUILD
index af816aef8655..3b7d3ba9688f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,6 +2,7 @@
pkgname=aechoterm-bin
_pkgname=Aechoterm
pkgver=4.0.1
+_electronversion=13
pkgrel=2
pkgdesc="A free, cross-platform terminal and file management tool for accessing remote servers with SSH and SFTP protocols.闪令是一款免费的、跨平台的,以SSH、SFTP协议访问远程服务器的终端、文件管理工具"
arch=(
@@ -9,12 +10,12 @@ arch=(
'x86_64'
)
url="https://ec.nantian.com.cn/"
-_githuburl="https://github.com/Aechoterm/Aechoterm"
+_ghurl="https://github.com/Aechoterm/Aechoterm"
license=('custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron13'
+ "electron${_electronversion}"
'hicolor-icon-theme'
'lib32-glibc'
'java-runtime'
@@ -24,12 +25,15 @@ depends=(
source=("${pkgname%-bin}.sh")
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::https://ec.cnd.nantiangzzx.com/${_pkgname}_${pkgver}_arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::https://ec.cnd.nantiangzzx.com/${_pkgname}_${pkgver}_amd64.deb")
-sha256sums=('d07e498ef8c07e15f5dfcf186b710b21c24726bb1ba48d024d99fd03814e0797')
+sha256sums=('68521cf799a902fb3c86aa1ebdcfa92566ee49621b0e1db5873a0501d893b2e6')
sha256sums_aarch64=('5ad55272b26a667cfcca3cc8c31b0afdabae8c718694b645cb19c83dc7387838')
sha256sums_x86_64=('c3cd799babbfca9a6c367891ed8612279bb59dd78ff93a374c304e9f69d78d43')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
- asar pack "${srcdir}/opt/${_pkgname}/resources/app" "${srcdir}/${pkgname%-bin}.asar"
sed "s|/opt/${_pkgname}/${pkgname%-bin} --no-sandbox %U|${pkgname%-bin}|g;s|Development|Utility|g" \
-i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
diff --git a/aechoterm.sh b/aechoterm.sh
index 22990071e705..98f84b151b4f 100644
--- a/aechoterm.sh
+++ b/aechoterm.sh
@@ -1,11 +1,15 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron13
-APPDIR="/usr/lib/aechoterm"
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file