diff options
author | zxp19821005 | 2023-12-14 11:01:07 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 11:01:07 +0800 |
commit | 985d0d58509c4e7b26e675f307b116e243c2044d (patch) | |
tree | 949dcd596fc5fd8f0bcad48d053ad3376310c1d1 | |
parent | 98da6b42d28d3010f4db10d3fca7b690dfdfd193 (diff) | |
download | aur-985d0d58509c4e7b26e675f307b116e243c2044d.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | ubports-installer.sh | 17 |
3 files changed, 20 insertions, 14 deletions
@@ -1,11 +1,10 @@ pkgbase = ubports-installer-bin pkgdesc = A simple tool to install Ubuntu Touch on UBports devices pkgver = 0.10.0 - pkgrel = 3 + pkgrel = 4 url = https://github.com/ubports/ubports-installer arch = x86_64 license = GPL3 - depends = bash depends = electron25 depends = hicolor-icon-theme depends = libusb @@ -16,6 +15,6 @@ pkgbase = ubports-installer-bin source = ubports-installer-0.10.0.deb::https://github.com/ubports/ubports-installer/releases/download/0.10.0/ubports-installer_0.10.0_linux_amd64.deb source = ubports-installer.sh sha256sums = a530f8fbb867b07aafdabf06459b2ffec5f64202a56f13bf87ca0c225b5b1189 - sha256sums = 908007c723f7e1ad74fea5e9d424be357ab39849aafcdced11c23014075b6579 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = ubports-installer-bin @@ -1,7 +1,8 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=ubports-installer-bin pkgver=0.10.0 -pkgrel=3 +_electronversion=25 +pkgrel=4 pkgdesc="A simple tool to install Ubuntu Touch on UBports devices" arch=('x86_64') url="https://github.com/ubports/ubports-installer" @@ -9,8 +10,7 @@ license=('GPL3') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'bash' - 'electron25' + "electron${_electronversion}" 'hicolor-icon-theme' 'libusb' 'lib32-glibc' @@ -21,8 +21,12 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('a530f8fbb867b07aafdabf06459b2ffec5f64202a56f13bf87ca0c225b5b1189' - '908007c723f7e1ad74fea5e9d424be357ab39849aafcdced11c23014075b6579') + '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data.tar.xz" sed "s|/opt/${pkgname%-bin}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } diff --git a/ubports-installer.sh b/ubports-installer.sh index 9ba803447594..2ec4412e5c4f 100644 --- a/ubports-installer.sh +++ b/ubports-installer.sh @@ -1,11 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron25 -APPDIR="/usr/lib/ubports-installer" -export PATH="${APPDIR}:${PATH}" -#export LD_LIBRARY_PATH="${APPDIR}/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 |