diff options
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | hyperkeys.sh | 8 |
3 files changed, 36 insertions, 31 deletions
@@ -1,14 +1,16 @@ pkgbase = hyperkeys-bin pkgdesc = Unleash you keyboard shorcuts - pkgver = 1.1.8 + pkgver = 1.3.0 pkgrel = 1 - url = https://hyperkeys.xureilab.com + url = https://hyperkeys.xureilab.com/ arch = x86_64 license = GPL3 + depends = bash + depends = electron20 provides = hyperkeys - noextract = hyperkeys-bin-1.1.8.AppImage - source = hyperkeys-bin-1.1.8.AppImage::https://github.com/xurei/hyperkeys/releases/download/v1.1.8/HyperKeys-1.1.8.AppImage - sha256sums = 4d0a608da3393990db8b592c5645fde507c6ccade497c96530bbb5a71f69f2e6 + 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 = 6c5542dd0968280fb9c2bce2957dd0b7bb6e8b5ed4c870a7e909bf980d5d2aff pkgname = hyperkeys-bin - @@ -1,32 +1,27 @@ # Maintainer: Dimitris Kiziridis <ragouel at outlook dot com> - pkgname=hyperkeys-bin -pkgver=1.1.8 +pkgver=1.3.0 pkgrel=1 pkgdesc="Unleash you keyboard shorcuts" arch=('x86_64') -url='https://hyperkeys.xureilab.com' +url="https://hyperkeys.xureilab.com/" +_githuburl="https://github.com/xurei/hyperkeys" license=('GPL3') -provides=('hyperkeys') -noextract=("${pkgname}-${pkgver}.AppImage") -source=("${pkgname}-${pkgver}.AppImage::https://github.com/xurei/hyperkeys/releases/download/v${pkgver}/HyperKeys-${pkgver}.AppImage") -sha256sums=('4d0a608da3393990db8b592c5645fde507c6ccade497c96530bbb5a71f69f2e6') - -package() { - chmod 755 ./${pkgname}-${pkgver}.AppImage - ./${pkgname}-${pkgver}.AppImage --appimage-extract - install -Dm644 squashfs-root/resources/app/icon.png "${pkgdir}/usr/share/pixmaps/hyperkeys.png" - gendesk -f -n --pkgname "${pkgname%-bin}" \ - --pkgdesc "$pkgdesc" \ - --name "HyperKeys" \ - --comment "$pkgdesc" \ - --exec "${pkgname%-bin}" \ - --categories 'Utility;Application' \ - --icon "${pkgname%-bin}" - install -Dm644 "${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" - install -d "${pkgdir}/usr/bin" - install -d "${pkgdir}/opt" - cp -avR squashfs-root/ "${pkgdir}/opt/${pkgname%-bin}" - ln -s /opt/${pkgname%-bin}/AppRun "${pkgdir}/usr/bin/hyperkeys" - find "${pkgdir}/opt/${pkgname%-bin}" -type d -exec chmod 755 {} + +conflits=("${pkgname%-bin}") +provides=("${pkgname%-bin}") +depends=('bash' 'electron20') +source=("${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver}/HyperKeys-${pkgver}.AppImage" + "${pkgname%-bin}.sh") +sha256sums=('2884e6025aa4dfee198f1279584e8ec798d8f9519cbe8c6ed1f4648b26e63711' + '6c5542dd0968280fb9c2bce2957dd0b7bb6e8b5ed4c870a7e909bf980d5d2aff') +prepare() { + chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" + "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null } +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}" + asar pack "${srcdir}/squashfs-root/resources/app" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar" + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" + sed "s|AppRun --no-sandbox %U|/opt/${pkgname%-bin}/${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" + install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" +}
\ No newline at end of file diff --git a/hyperkeys.sh b/hyperkeys.sh new file mode 100644 index 000000000000..cd80d88c8aac --- /dev/null +++ b/hyperkeys.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron20 +_ASAR="/opt/hyperkeys/hyperkeys.asar" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec ${_ELECTRON} ${_ASAR} "$@" +else + exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" +fi
\ No newline at end of file |