summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-20 17:35:09 +0800
committerzxp198210052023-12-20 17:35:09 +0800
commiteea0fd1dfa43d56eea145618214408c142901520 (patch)
tree0673ace6bd6f0f482721f259a4596d201771e111
parentb762637b16c13d0dece6311848a685d707f63d52 (diff)
downloadaur-eea0fd1dfa43d56eea145618214408c142901520.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--desktop-notifier.sh22
3 files changed, 24 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de997884c2fd..bbfc32183d68 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = desktop-notifier-bin
pkgdesc = Application which sent a notifier when data change about a link
pkgver = 0.0.8
- pkgrel = 6
+ pkgrel = 7
url = https://github.com/maxgfr/desktop-notifier
arch = x86_64
license = custom
@@ -19,6 +19,6 @@ pkgbase = desktop-notifier-bin
source = desktop-notifier-0.0.8.AppImage::https://github.com/maxgfr/desktop-notifier/releases/download/0.0.8/Desktop.Notifier-0.0.7.AppImage
source = desktop-notifier.sh
sha256sums = bcde59d6d7501d990adfe88f08c9794153df98177da073b80442fab2c8d13abe
- sha256sums = 92f6e43eb9073907be4aefb955268d8c5316c75fa20ef17181af819b0d760b0b
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
pkgname = desktop-notifier-bin
diff --git a/PKGBUILD b/PKGBUILD
index f321ad851033..49d9cd77daa6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
pkgname=desktop-notifier-bin
_appname=Desktop.Notifier
pkgver=0.0.8
-pkgrel=6
+_electronversion=23
+pkgrel=7
pkgdesc="Application which sent a notifier when data change about a link"
arch=('x86_64')
url="https://github.com/maxgfr/desktop-notifier"
@@ -10,7 +11,7 @@ license=('custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'electron23'
+ "electron${_electronversion}"
'hicolor-icon-theme'
'libx11'
'gdk-pixbuf2'
@@ -27,8 +28,12 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('bcde59d6d7501d990adfe88f08c9794153df98177da073b80442fab2c8d13abe'
- '92f6e43eb9073907be4aefb955268d8c5316c75fa20ef17181af819b0d760b0b')
+ '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 --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
diff --git a/desktop-notifier.sh b/desktop-notifier.sh
index cac0e7f9c1fc..c77c53567639 100644
--- a/desktop-notifier.sh
+++ b/desktop-notifier.sh
@@ -1,11 +1,17 @@
-#!/bin/bash
-_ELECTRON=/usr/bin/electron23
-APPDIR=/usr/lib/desktop-notifier
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${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