diff options
author | zxp19821005 | 2023-12-12 16:54:51 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-12 16:54:51 +0800 |
commit | 85f9017e453cb8c86b3f48762b27e5879848e547 (patch) | |
tree | 4c5fa60c5be787992ce6a286391762d4d594166d | |
parent | e3fb095bec22a90881d1aa250dbe94bd63905be6 (diff) | |
download | aur-85f9017e453cb8c86b3f48762b27e5879848e547.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | enotebook.sh | 16 |
3 files changed, 28 insertions, 14 deletions
@@ -1,17 +1,17 @@ pkgbase = enotebook-bin pkgdesc = Opensource desktop app to create and store notes. pkgver = 1.0.0 - pkgrel = 1 + pkgrel = 2 url = https://enotebook-react.vercel.app/ arch = x86_64 license = custom - depends = bash depends = electron27 + depends = hicolor-icon-theme provides = enotebook=1.0.0 conflicts = enotebook source = enotebook-1.0.0.deb::https://github.com/aestrus219/eNotebook/releases/download/v1.0.0/eNotebook@1.0.0-linux.deb source = enotebook.sh sha256sums = 6eeb0514b9690bdef6c4d5cc8ea991f76fe12fdff6d616c2945df704b7a26efa - sha256sums = e62ad5836f1ffe73ffc94f6432421253f6e8e2894e0db07debcb84c7178d5db6 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = enotebook-bin @@ -2,7 +2,8 @@ pkgname=enotebook-bin _pkgname=eNotebook pkgver=1.0.0 -pkgrel=1 +_electronversion=27 +pkgrel=2 pkgdesc="Opensource desktop app to create and store notes." arch=('x86_64') url="https://enotebook-react.vercel.app/" @@ -10,12 +11,21 @@ _ghurl="https://github.com/aestrus219/eNotebook" license=('custom') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") -depends=('bash' 'electron27') -source=("${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}@${pkgver}-linux.deb" - "${pkgname%-bin}.sh") +depends=( + "electron${_electronversion}" + 'hicolor-icon-theme' +) +source=( + "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}@${pkgver}-linux.deb" + "${pkgname%-bin}.sh" +) sha256sums=('6eeb0514b9690bdef6c4d5cc8ea991f76fe12fdff6d616c2945df704b7a26efa' - 'e62ad5836f1ffe73ffc94f6432421253f6e8e2894e0db07debcb84c7178d5db6') + '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}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } diff --git a/enotebook.sh b/enotebook.sh index e272304d6e13..2ec4412e5c4f 100644 --- a/enotebook.sh +++ b/enotebook.sh @@ -1,10 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron27 -APPDIR="/usr/lib/enotebook" -export PATH="${APPDIR}:${APPDIR}/usr/sbin:${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 |