summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-12 17:07:35 +0800
committerzxp198210052023-12-12 17:07:35 +0800
commit74db5b493d97b95772509f908c9846533ed131f3 (patch)
treef4b705cd6a81402846eff9ff388510371f5149e8
parent541d87902ba0ac0176bb566205a79b7dba087ad9 (diff)
downloadaur-74db5b493d97b95772509f908c9846533ed131f3.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD21
-rw-r--r--barklarm.sh16
3 files changed, 23 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 907ac7a3566c..98c948440a82 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,14 +5,12 @@ pkgbase = barklarm-bin
url = https://www.barklarm.com
arch = x86_64
license = Apache
- makedepends = asar
- depends = bash
depends = electron25
provides = barklarm=1.11.4
conflicts = barklarm
source = barklarm-1.11.4.deb::https://github.com/Barklarm/barklarm-app/releases/download/v1.11.4/barklarm_1.11.4_amd64.deb
source = barklarm.sh
sha256sums = 045397c3696f9b583003fcafa3c7c41e3a49e3ec04f6590811d2ab5798ddf02c
- sha256sums = f89ab834a71afa036d8080823eabdc4484e5ef2304298624ca233b5c0b2eafac
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = barklarm-bin
diff --git a/PKGBUILD b/PKGBUILD
index 9d50032c9472..fda43236aa52 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=barklarm-bin
pkgver=1.11.4
+_electronversion=25
pkgrel=1
pkgdesc="Displays the status of projects as an item in the tray menu bar"
arch=('x86_64')
@@ -10,24 +11,26 @@ license=('Apache')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'bash'
- 'electron25'
+ "electron${_electronversion}"
)
-makedepends=(
- 'asar'
+source=(
+ "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
+ "${pkgname%-bin}.sh"
)
-source=("${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
- "${pkgname%-bin}.sh")
sha256sums=('045397c3696f9b583003fcafa3c7c41e3a49e3ec04f6590811d2ab5798ddf02c'
- 'f89ab834a71afa036d8080823eabdc4484e5ef2304298624ca233b5c0b2eafac')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.zst"
- asar p "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${srcdir}/app.asar"
sed "s| %U||g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
- install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
+ cp -r "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/pixmaps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
} \ No newline at end of file
diff --git a/barklarm.sh b/barklarm.sh
index 296f116d4017..2ec4412e5c4f 100644
--- a/barklarm.sh
+++ b/barklarm.sh
@@ -1,10 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron25
-APPDIR="/usr/lib/barklarm"
-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