diff options
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | aechoterm.sh | 20 |
3 files changed, 21 insertions, 13 deletions
@@ -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 @@ -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 |