summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-01-05 11:17:11 +0800
committerzxp198210052024-01-05 11:17:11 +0800
commit50f012eaac20f86a6ecd4a25e88860dbe4bfbf1d (patch)
tree438560a3fa6029be397b6481becefdc3fac8d754
parent39c015f5bb20fa6295f42b4ee63867ba8dd217f6 (diff)
downloadaur-50f012eaac20f86a6ecd4a25e88860dbe4bfbf1d.tar.gz
fix errors
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD18
-rw-r--r--arctis-monitor.sh22
3 files changed, 29 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 259338767b05..6f5730b2d488 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
pkgbase = arctis-monitor-bin
pkgdesc = Electron Tray application to view Battery Level of Arctis Headsets
pkgver = 0.0.12
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/richrace/arctis-monitor
arch = x86_64
license = MIT
depends = electron26
depends = libusb
+ depends = nodejs
provides = arctis-monitor=0.0.12
conflicts = arctis-monitor
source = arctis-monitor-0.0.12.deb::https://github.com/richrace/arctis-monitor/releases/download/v0.0.12/arctis-monitor_0.0.12_amd64.deb
- source = LICENSE::https://raw.githubusercontent.com/richrace/arctis-monitor/v0.0.12/LICENSE.md
+ source = LICENSE-0.0.12::https://raw.githubusercontent.com/richrace/arctis-monitor/v0.0.12/LICENSE.md
source = arctis-monitor.sh
sha256sums = 35f546aa8a23eb79527a1ff489fa9ab9d1412f69fe2b15e75e43efcfa1e844e9
sha256sums = bd5c70f61f5c60d42bffbadd12de9a6e0f3272afe8d869e7251d4f0c6d67025d
- sha256sums = 8072d2781be81fe8c31f75111ea190a0b50289fff2b89afaa947fd51c01252b3
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = arctis-monitor-bin
diff --git a/PKGBUILD b/PKGBUILD
index 01f8c600817f..edb93f89657a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=arctis-monitor-bin
pkgver=0.0.12
-pkgrel=2
+_electronversion=26
+pkgrel=3
pkgdesc="Electron Tray application to view Battery Level of Arctis Headsets"
arch=("x86_64")
url="https://github.com/richrace/arctis-monitor"
@@ -9,21 +10,24 @@ license=("MIT")
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron26'
+ "electron${_electronversion}"
'libusb'
+ 'nodejs'
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
- "LICENSE::https://raw.githubusercontent.com/richrace/arctis-monitor/v${pkgver}/LICENSE.md"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/richrace/arctis-monitor/v${pkgver}/LICENSE.md"
"${pkgname%-bin}.sh"
)
sha256sums=('35f546aa8a23eb79527a1ff489fa9ab9d1412f69fe2b15e75e43efcfa1e844e9'
'bd5c70f61f5c60d42bffbadd12de9a6e0f3272afe8d869e7251d4f0c6d67025d'
- '8072d2781be81fe8c31f75111ea190a0b50289fff2b89afaa947fd51c01252b3')
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.zst"
- sed "s| %U||g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
- asar pack "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${srcdir}/app.asar"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
@@ -31,5 +35,5 @@ package() {
cp -r "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/usr/share/pixmaps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
- install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} \ No newline at end of file
diff --git a/arctis-monitor.sh b/arctis-monitor.sh
index f03fd8fc290e..c77c53567639 100644
--- a/arctis-monitor.sh
+++ b/arctis-monitor.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron26
-APPDIR="/usr/lib/arctis-monitor"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app"
+#!/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