diff options
author | zxp19821005 | 2023-12-14 09:25:25 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 09:25:25 +0800 |
commit | a2485c03b8bfce36eb959b3fa8bc79d71a461009 (patch) | |
tree | 04771f9e1f9db6969e087467bfb9f05469ab7d42 | |
parent | 4d0be72a5335359f83a1a989f9ff305e9eb6b4a9 (diff) | |
download | aur-a2485c03b8bfce36eb959b3fa8bc79d71a461009.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | backend-ai-desktop.sh | 16 |
3 files changed, 20 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = backend-ai-desktop-bin pkgdesc = Provides a convenient environment for users, while allowing various commands to be executed without CLI. It also provides some visual features that are not provided by the CLI, such as dashboards and statistics. pkgver = 23.09.7 - pkgrel = 1 + pkgrel = 2 url = https://www.backend.ai/ arch = aarch64 arch = x86_64 @@ -15,7 +15,7 @@ pkgbase = backend-ai-desktop-bin conflicts = backend.ai conflicts = backend.ai-desktop source = backend-ai-desktop.sh - sha256sums = 27e8e3578355522309a16c4812b43e11f4632196060696b2705a8fca9a65c3f3 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 source_aarch64 = backend-ai-desktop-23.09.7-aarch64.zip::https://github.com/lablup/backend.ai-webui/releases/download/v23.09.7/backend.ai-desktop-23.09.7-linux-arm64.zip sha256sums_aarch64 = 48bba4f5f37a0cd1e927aba67bf709593fffc0fb5aa1104b5eca4d2c2f3554e2 source_x86_64 = backend-ai-desktop-23.09.7-x86_64.zip::https://github.com/lablup/backend.ai-webui/releases/download/v23.09.7/backend.ai-desktop-23.09.7-linux-x64.zip @@ -3,7 +3,8 @@ _pkgname=backend.ai-desktop pkgname="${_pkgname//./-}-bin" _appname="Backend.AI Desktop" pkgver=23.09.7 -pkgrel=1 +_electronversion=26 +pkgrel=2 pkgdesc="Provides a convenient environment for users, while allowing various commands to be executed without CLI. It also provides some visual features that are not provided by the CLI, such as dashboards and statistics." arch=( "aarch64" @@ -19,7 +20,7 @@ conflicts=( "${_pkgname}" ) depends=( - 'electron26' + "electron${_electronversion}" 'hicolor-icon-theme' ) makedepends=( @@ -29,10 +30,14 @@ makedepends=( source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.zip::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-arm64.zip") source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-x64.zip") source=("${pkgname%-bin}.sh") -sha256sums=('27e8e3578355522309a16c4812b43e11f4632196060696b2705a8fca9a65c3f3') +sha256sums=('8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') sha256sums_aarch64=('48bba4f5f37a0cd1e927aba67bf709593fffc0fb5aa1104b5eca4d2c2f3554e2') sha256sums_x86_64=('6aba02d6302e6c4743529136a1e26ce5c2c734d5cf4f1da123d4a2976a990810') build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" gendesk -q -f -n --pkgname="${_pkgname//./-}-bin" --categories "Development" --name "${pkgname%-bin}" --exec "${pkgname%-bin}" asar e "${srcdir}/${_appname}-linux-"*/resources/app.asar "${srcdir}/app.asar.unpacked" } diff --git a/backend-ai-desktop.sh b/backend-ai-desktop.sh index 11e99c9d1ae5..2ec4412e5c4f 100644 --- a/backend-ai-desktop.sh +++ b/backend-ai-desktop.sh @@ -1,10 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron26 -APPDIR="/usr/lib/backend-ai-desktop" -export PATH="${APPDIR}:${PATH}" -_ASAR="${APPDIR}/app.asar" +set -e +_APPDIR="/usr/lib/@appname@" +export PATH="${_APPDIR}:${PATH}" +export ELECTRON_IS_DEV=0 +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +_ASAR="${_APPDIR}/@appasar@" 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 |