summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-12 16:57:14 +0800
committerzxp198210052023-12-12 16:57:14 +0800
commitf917f69657ee1c7c71305636f8dc59667014eefa (patch)
tree47cf3a0d85a5bedb25b11e3a57a1ecda51dc5862
parentf25b194c57b391b9ac130857bb8d14cd9c3bf686 (diff)
downloadaur-f917f69657ee1c7c71305636f8dc59667014eefa.tar.gz
fix errors
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD18
-rw-r--r--knowte.sh17
3 files changed, 24 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f1e299f62a30..92e4937f6956 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,10 @@
pkgbase = knowte-bin
pkgdesc = A note taking application that allows you to quickly and easily organize and find your notes.
pkgver = 3.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/digimezzo/knowte
arch = x86_64
license = GPL3
- depends = bash
depends = electron17
depends = hicolor-icon-theme
provides = knowte=3.0.0
@@ -13,6 +12,6 @@ pkgbase = knowte-bin
source = knowte-3.0.0.pacman::https://github.com/digimezzo/knowte/releases/download/v3.0.0/Knowte-3.0.0.pacman
source = knowte.sh
sha256sums = 6f7ad45262020e24c66536d627442b27601109d434e0d5870de2d48519fe2750
- sha256sums = 4e0dab5e13e4673f344daec0c791702767db3c7a1545dff5355baef378112224
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = knowte-bin
diff --git a/PKGBUILD b/PKGBUILD
index 64d5a9674807..dd1795c25eaf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
pkgname=knowte-bin
_pkgname=Knowte
pkgver=3.0.0
-pkgrel=1
+_electronversion=17
+pkgrel=2
pkgdesc="A note taking application that allows you to quickly and easily organize and find your notes."
arch=('x86_64')
url="https://github.com/digimezzo/knowte"
@@ -10,15 +11,20 @@ license=('GPL3')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'bash'
- 'electron17'
+ "electron${_electronversion}"
'hicolor-icon-theme'
)
-source=("${pkgname%-bin}-${pkgver}.pacman::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.pacman"
- "${pkgname%-bin}.sh")
+source=(
+ "${pkgname%-bin}-${pkgver}.pacman::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.pacman"
+ "${pkgname%-bin}.sh"
+)
sha256sums=('6f7ad45262020e24c66536d627442b27601109d434e0d5870de2d48519fe2750'
- '4e0dab5e13e4673f344daec0c791702767db3c7a1545dff5355baef378112224')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
sed "s|/opt/${_pkgname}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
diff --git a/knowte.sh b/knowte.sh
index 1d446c7ff071..2ec4412e5c4f 100644
--- a/knowte.sh
+++ b/knowte.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron17
-APPDIR="/usr/lib/knowte"
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader":"${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