diff options
author | zxp19821005 | 2023-12-29 11:53:44 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-29 11:53:44 +0800 |
commit | 068d9cb6541f03f2348b8c2b4023e672ab62f489 (patch) | |
tree | c2446e960072ffc6fb38a95a9877ca63a7654788 | |
parent | 0680f63e18a1a39596ba1e09850820a1ece39b4e (diff) | |
download | aur-068d9cb6541f03f2348b8c2b4023e672ab62f489.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | hyperkeys.sh | 22 |
3 files changed, 35 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = hyperkeys-bin pkgdesc = Unleash you keyboard shorcuts pkgver = 1.3.0 - pkgrel = 4 + pkgrel = 5 url = https://hyperkeys.xureilab.com/ arch = x86_64 license = GPL3 @@ -25,11 +25,14 @@ pkgbase = hyperkeys-bin depends = xdotool depends = perl depends = python + depends = nodejs provides = hyperkeys=1.3.0 conflicts = hyperkeys + options = !emptydirs + options = !strip source = hyperkeys-1.3.0.AppImage::https://github.com/xurei/hyperkeys/releases/download/v1.3.0/HyperKeys-1.3.0.AppImage source = hyperkeys.sh sha256sums = 2884e6025aa4dfee198f1279584e8ec798d8f9519cbe8c6ed1f4648b26e63711 - sha256sums = 5d04f8d8b55d211a4174ce1201307c1bdd004080b032d5c1da3e0100180ee2c8 + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf pkgname = hyperkeys-bin @@ -3,7 +3,8 @@ pkgname=hyperkeys-bin _appname=HyperKeys pkgver=1.3.0 -pkgrel=4 +_electronversion=20 +pkgrel=5 pkgdesc="Unleash you keyboard shorcuts" arch=('x86_64') url="https://hyperkeys.xureilab.com/" @@ -12,7 +13,7 @@ license=('GPL3') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'electron20' + "electron${_electronversion}" 'libx11' 'gdk-pixbuf2' 'libxext' @@ -31,19 +32,29 @@ depends=( 'xdotool' 'perl' 'python' + 'nodejs' ) makedepends=( 'squashfuse' ) +options=( + '!emptydirs' + '!strip' +) source=( "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage" - "${pkgname%-bin}.sh") + "${pkgname%-bin}.sh" +) sha256sums=('2884e6025aa4dfee198f1279584e8ec798d8f9519cbe8c6ed1f4648b26e63711' - '5d04f8d8b55d211a4174ce1201307c1bdd004080b032d5c1da3e0100180ee2c8') + '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app|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" + sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; } package() { diff --git a/hyperkeys.sh b/hyperkeys.sh index 0c2134b0c8a1..c77c53567639 100644 --- a/hyperkeys.sh +++ b/hyperkeys.sh @@ -1,11 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron20 -APPDIR=/usr/lib/hyperkeys -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 |