summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-04 10:24:59 +0800
committerzxp198210052024-01-04 10:24:59 +0800
commitbdb91d0499e6e24de11592f958465a2d0aa7dc01 (patch)
tree783a54a26a7c6888f299035a5208f9704a165987
parentac8c09317a87c2214dcd4b8304e01e144e93238a (diff)
downloadaur-bdb91d0499e6e24de11592f958465a2d0aa7dc01.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--liground.sh22
3 files changed, 26 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1dcd2a0fcf98..0fb152899ba2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = liground-bin
pkgdesc = A free, open-source and modern Chess Variant Analysis GUI for the 21st century
pkgver = 0.4.0
- pkgrel = 4
+ pkgrel = 5
url = https://ml-research.github.io/liground.github.io/
arch = x86_64
license = AGPL3
@@ -18,6 +18,6 @@ pkgbase = liground-bin
source = liground-0.4.0.AppImage::https://github.com/ml-research/liground/releases/download/0.4.0/liground-0.4.0-linux.AppImage
source = liground.sh
sha256sums = 7d0c4994cb489689183b3768952d9199971060dd873037a988c25f8d86cc1ad4
- sha256sums = 6d4a0582113bbeeb99c1fd54948b437d152bdcfc4540e28db4fb5e2ea798cbb6
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = liground-bin
diff --git a/PKGBUILD b/PKGBUILD
index e7b5809ce818..a1f1c4eea773 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,15 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=liground-bin
pkgver=0.4.0
-pkgrel=4
+_electronversion=11
+pkgrel=5
pkgdesc="A free, open-source and modern Chess Variant Analysis GUI for the 21st century"
arch=('x86_64')
url="https://ml-research.github.io/liground.github.io/"
_ghurl="https://github.com/ml-research/liground"
license=('AGPL3')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
depends=(
'electron11'
'libx11'
@@ -19,18 +22,20 @@ depends=(
makedepends=(
'squashfuse'
)
-provides=("${pkgname%-bin}=${pkgver}")
-conflicts=("${pkgname%-bin}")
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-linux.AppImage"
"${pkgname%-bin}.sh"
)
sha256sums=('7d0c4994cb489689183b3768952d9199971060dd873037a988c25f8d86cc1ad4'
- '6d4a0582113bbeeb99c1fd54948b437d152bdcfc4540e28db4fb5e2ea798cbb6')
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -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 %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+ sed "s|AppRun|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
find "${srcdir}/squashfs-root" -type d -exec chmod 755 {} \;
}
package() {
diff --git a/liground.sh b/liground.sh
index 45a32a34aee6..c77c53567639 100644
--- a/liground.sh
+++ b/liground.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron11
-APPDIR=/usr/lib/liground
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
fi \ No newline at end of file