diff options
author | zxp19821005 | 2023-12-14 10:45:06 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 10:45:06 +0800 |
commit | b1a3ba8da19ed3f426f66aab9dcd28ecfabd08cb (patch) | |
tree | bc127ecb1ded877c5c3364bbbf0936ed79163f46 | |
parent | 75c35cf9b29610769aad3d40f2e461ebf12fb502 (diff) | |
download | aur-b1a3ba8da19ed3f426f66aab9dcd28ecfabd08cb.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | tesler.sh | 17 |
3 files changed, 23 insertions, 17 deletions
@@ -1,12 +1,11 @@ pkgbase = tesler-bin pkgdesc = TesLEr - The Tesla Sentinel Viewer pkgver = 0.2.3 - pkgrel = 3 + pkgrel = 4 url = https://github.com/j-catania/TeslaSentinelViewer arch = x86_64 license = MIT makedepends = squashfuse - depends = bash depends = electron22 depends = hicolor-icon-theme depends = libxext @@ -18,10 +17,10 @@ pkgbase = tesler-bin provides = tesler=0.2.3 conflicts = tesler source = tesler-0.2.3.AppImage::https://github.com/j-catania/TeslaSentinelViewer/releases/download/v0.2.3/TesLEr-0.2.3.AppImage - source = LICENSE::https://raw.githubusercontent.com/j-catania/TeslaSentinelViewer/v0.2.3/LICENSE + source = LICENSE-0.2.3::https://raw.githubusercontent.com/j-catania/TeslaSentinelViewer/v0.2.3/LICENSE source = tesler.sh sha256sums = 5447e01520ad757fdbb4130e764a863c9d282c5dd48cf2fabbd33e171a2decfd sha256sums = 29eee3e9d9c5dd67213ec3ab4a7eef57a1224750e2e9aab3a278177a9444a355 - sha256sums = 890ba5ec0ef7d92b90fc71b27a4ebd8b26f83dd2e880b6803c67887dd1e2fd10 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = tesler-bin @@ -2,7 +2,8 @@ pkgname=tesler-bin _pkgname=TesLEr pkgver=0.2.3 -pkgrel=3 +_electronversion=22 +pkgrel=4 pkgdesc="TesLEr - The Tesla Sentinel Viewer" arch=('x86_64') url="https://github.com/j-catania/TeslaSentinelViewer" @@ -10,8 +11,7 @@ license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'bash' - 'electron22' + "electron${_electronversion}" 'hicolor-icon-theme' 'libxext' 'gdk-pixbuf2' @@ -25,13 +25,17 @@ makedepends=( ) source=( "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/TesLEr-${pkgver}.AppImage" - "LICENSE::https://raw.githubusercontent.com/j-catania/TeslaSentinelViewer/v${pkgver}/LICENSE" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/j-catania/TeslaSentinelViewer/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) sha256sums=('5447e01520ad757fdbb4130e764a863c9d282c5dd48cf2fabbd33e171a2decfd' '29eee3e9d9c5dd67213ec3ab4a7eef57a1224750e2e9aab3a278177a9444a355' - '890ba5ec0ef7d92b90fc71b27a4ebd8b26f83dd2e880b6803c67887dd1e2fd10') + '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" @@ -45,5 +49,5 @@ package() { -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" done install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" - install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file diff --git a/tesler.sh b/tesler.sh index 854eca3921ad..2ec4412e5c4f 100644 --- a/tesler.sh +++ b/tesler.sh @@ -1,11 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron22 -APPDIR=/usr/lib/tesler -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_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 |