summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-14 10:12:32 +0800
committerzxp198210052023-12-14 10:12:32 +0800
commit344b050ea2bfa5a3bda843ee5c26fe2d82ecfbfc (patch)
tree6fe1c1020f93f8db515f9fba4cbc189142afb4b9
parentc77f5901332465c0c05f4700fe9dee84ada7e5b7 (diff)
downloadaur-344b050ea2bfa5a3bda843ee5c26fe2d82ecfbfc.tar.gz
fix errors
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD15
-rw-r--r--slack-on-keys.sh17
3 files changed, 22 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 37a08236ba87..a15c2b8e4e03 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,18 @@
pkgbase = slack-on-keys-bin
pkgdesc = Control your Slack from any app window with keyboard shortcuts ⚡ Set up custom keyboard shortcuts for various Slack actions
pkgver = 1.1.0
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/yakshaG/slack-on-keys
arch = x86_64
license = MIT
- depends = bash
depends = electron24
provides = slack-on-keys=1.1.0
conflicts = slack-on-keys
source = slack-on-keys-1.1.0.deb::https://github.com/yakshaG/slack-on-keys/releases/download/v1.1.0/slack-on-keys_1.1.0_amd64.deb
- source = LICENSE::https://raw.githubusercontent.com/yakshaG/slack-on-keys/main/LICENSE
+ source = LICENSE-1.1.0::https://raw.githubusercontent.com/yakshaG/slack-on-keys/main/LICENSE
source = slack-on-keys.sh
sha256sums = 73e383feed41399ef29c309be84eeb252ad6b26ab51c3db40b8485384e856fc1
sha256sums = f95d9068a4ccb1cbc8bad397f046494b5e2d6546fd6be7546edd5c26765cd956
- sha256sums = 48ef319fc407be60b5e09488bfa93e633c3c39ad7a07e72f6e3fb10af3f67cac
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = slack-on-keys-bin
diff --git a/PKGBUILD b/PKGBUILD
index e3f88813daa1..e9ed62ef909b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=slack-on-keys-bin
pkgver=1.1.0
-pkgrel=4
+_electronversion=24
+pkgrel=5
pkgdesc="Control your Slack from any app window with keyboard shortcuts ⚡ Set up custom keyboard shortcuts for various Slack actions"
arch=('x86_64')
url="https://github.com/yakshaG/slack-on-keys"
@@ -9,20 +10,22 @@ license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- 'bash'
- 'electron24'
+ "electron${_electronversion}"
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb"
- "LICENSE::https://raw.githubusercontent.com/yakshaG/slack-on-keys/main/LICENSE"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/yakshaG/slack-on-keys/main/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('73e383feed41399ef29c309be84eeb252ad6b26ab51c3db40b8485384e856fc1'
'f95d9068a4ccb1cbc8bad397f046494b5e2d6546fd6be7546edd5c26765cd956'
- '48ef319fc407be60b5e09488bfa93e633c3c39ad7a07e72f6e3fb10af3f67cac')
+ '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 pack "${srcdir}/usr/lib/${pkgname%-bin}/resources/app" "${srcdir}/${pkgname%-bin}.asar"
sed "s| %U||g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
diff --git a/slack-on-keys.sh b/slack-on-keys.sh
index 1d77a08f3d4b..2ec4412e5c4f 100644
--- a/slack-on-keys.sh
+++ b/slack-on-keys.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron24
-APPDIR="/usr/lib/slack-on-keys"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app"
+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