summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-14 09:51:31 +0800
committerzxp198210052023-12-14 09:51:31 +0800
commitf7590156b987ddafb8545746b781c67f46e8063d (patch)
tree3692c409663440f7fb5f3738bfe7f0814267dfc8
parentf18560a841fb84cbd227d74d3e02300a4bd7cf0c (diff)
downloadaur-f7590156b987ddafb8545746b781c67f46e8063d.tar.gz
fix errors
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD16
-rw-r--r--sabaki.sh17
3 files changed, 23 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 966ca5b262d5..5e4dce61b2bd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,12 @@
pkgbase = sabaki-bin
pkgdesc = An elegant Go board and SGF editor for a more civilized age.
pkgver = 0.52.2
- pkgrel = 3
+ pkgrel = 4
url = https://sabaki.yichuanshen.de/
arch = i686
arch = x86_64
license = MIT
makedepends = squashfuse
- depends = bash
depends = electron13
depends = hicolor-icon-theme
depends = libx11
@@ -18,10 +17,10 @@ pkgbase = sabaki-bin
provides = sabaki=0.52.2
conflicts = sabaki
conflicts = sabaki-electron
- source = LICENSE.md::https://raw.githubusercontent.com/SabakiHQ/Sabaki/v0.52.2/LICENSE.md
+ source = LICENSE-0.52.2.md::https://raw.githubusercontent.com/SabakiHQ/Sabaki/v0.52.2/LICENSE.md
source = sabaki.sh
sha256sums = a5c065dbac7a3076b8ac3437280ac8d721cb52c6c6ff8d0e5509fa9111c81349
- sha256sums = 1e7679cdaa0c36eca6a17267db46d2d5865a0de27db1e4b51c06fa0540d6b81c
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
source_i686 = sabaki-0.52.2-i686.AppImage::https://github.com/SabakiHQ/Sabaki/releases/download/v0.52.2/sabaki-v0.52.2-linux-ia32.AppImage
sha256sums_i686 = 51344817aaf2b92578a57c0914e681abaa07834041da54252473a781387c8644
source_x86_64 = sabaki-0.52.2-x86_64.AppImage::https://github.com/SabakiHQ/Sabaki/releases/download/v0.52.2/sabaki-v0.52.2-linux-x64.AppImage
diff --git a/PKGBUILD b/PKGBUILD
index 5687dc2ac2d0..3b1c3c77dc0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=sabaki-bin
pkgver=0.52.2
-pkgrel=3
+_electronversion=13
+pkgrel=4
pkgdesc="An elegant Go board and SGF editor for a more civilized age."
arch=(
'i686'
@@ -13,8 +14,7 @@ license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}" "${pkgname%-bin}-electron")
depends=(
- 'bash'
- 'electron13'
+ "electron${_electronversion}"
'hicolor-icon-theme'
'libx11'
'gdk-pixbuf2'
@@ -28,14 +28,18 @@ makedepends=(
source_i686=("${pkgname%-bin}-${pkgver}-i686.AppImage::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-ia32.AppImage")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-x64.AppImage")
source=(
- "LICENSE.md::https://raw.githubusercontent.com/SabakiHQ/Sabaki/v${pkgver}/LICENSE.md"
+ "LICENSE-${pkgver}.md::https://raw.githubusercontent.com/SabakiHQ/Sabaki/v${pkgver}/LICENSE.md"
"${pkgname%-bin}.sh"
)
sha256sums=('a5c065dbac7a3076b8ac3437280ac8d721cb52c6c6ff8d0e5509fa9111c81349'
- '1e7679cdaa0c36eca6a17267db46d2d5865a0de27db1e4b51c06fa0540d6b81c')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
sha256sums_i686=('51344817aaf2b92578a57c0914e681abaa07834041da54252473a781387c8644')
sha256sums_x86_64=('c2e0a3e47bcd65cd8a39d7393b8f6ea4d4e81432a230c59ec7291cb478b9d446')
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}-${CARCH}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
@@ -50,5 +54,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.md" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
} \ No newline at end of file
diff --git a/sabaki.sh b/sabaki.sh
index a3765d70b362..2ec4412e5c4f 100644
--- a/sabaki.sh
+++ b/sabaki.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron13
-APPDIR="/usr/lib/sabaki"
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${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