diff options
author | zxp19821005 | 2024-01-04 15:25:32 +0800 |
---|---|---|
committer | zxp19821005 | 2024-01-04 15:25:32 +0800 |
commit | 4d2bb4b9aa37e70e4b55e3c3bf6787ce2a6aca15 (patch) | |
tree | 5997ffa10cafa5fe5714294ad0c13f31d316c955 | |
parent | 17667c3b7a3a84c85c9d95159df75d1aed54b90f (diff) | |
download | aur-4d2bb4b9aa37e70e4b55e3c3bf6787ce2a6aca15.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | mechakeys.sh | 22 |
3 files changed, 32 insertions, 29 deletions
@@ -1,27 +1,23 @@ pkgbase = mechakeys-bin pkgdesc = An integrated typing environment, a collection of interconnected customization tools built around your keyboard and mouse. pkgver = 2.0.6 - pkgrel = 1 + pkgrel = 2 url = https://v2.robolab.io arch = x86_64 license = custom makedepends = squashfuse depends = electron12 - depends = libx11 - depends = gdk-pixbuf2 - depends = libxext + depends = dbus-glib depends = libdbusmenu-glib depends = gtk2 - depends = dbus-glib - depends = libxtst depends = libxkbcommon-x11 provides = mechakeys=2.0.6 conflicts = mechakeys source = mechakeys-2.0.6.AppImage::https://github.com/robolab-io/mechakeys-distro/releases/download/v2.0.6/MechaKeys-2.0.6.AppImage - source = LICENSE.html::https://v2.robolab.io/terms + source = LICENSE-2.0.6.html::https://v2.robolab.io/terms source = mechakeys.sh sha256sums = ba45cb02a9cf9ccef4842768b612d42cf11c82dc22e94a860364975abd60f74b - sha256sums = 04d6d6a6e5f277ec57b1365e94c56d39e00f4792cec45254cc1cc1ac8b73727a - sha256sums = 33d0882e1cd13a7684b64a147c3b21ae30ff394f205d1541ee790cc315506200 + sha256sums = 61095272481b31698b4b156b3b9d3c1082067e7356d185ab4ffe8ed3e3711e92 + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf pkgname = mechakeys-bin @@ -2,7 +2,8 @@ pkgname=mechakeys-bin _appname=MechaKeys pkgver=2.0.6 -pkgrel=1 +_electronversion=12 +pkgrel=2 pkgdesc="An integrated typing environment, a collection of interconnected customization tools built around your keyboard and mouse." arch=('x86_64') url="https://v2.robolab.io" @@ -11,14 +12,10 @@ license=('custom') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'electron12' - 'libx11' - 'gdk-pixbuf2' - 'libxext' + "electron${_electronversion}" + 'dbus-glib' 'libdbusmenu-glib' 'gtk2' - 'dbus-glib' - 'libxtst' 'libxkbcommon-x11' ) makedepends=( @@ -26,16 +23,20 @@ makedepends=( ) source=( "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage" - "LICENSE.html::${url}/terms" + "LICENSE-${pkgver}.html::${url}/terms" "${pkgname%-bin}.sh" ) sha256sums=('ba45cb02a9cf9ccef4842768b612d42cf11c82dc22e94a860364975abd60f74b' - '04d6d6a6e5f277ec57b1365e94c56d39e00f4792cec45254cc1cc1ac8b73727a' - '33d0882e1cd13a7684b64a147c3b21ae30ff394f205d1541ee790cc315506200') + '61095272481b31698b4b156b3b9d3c1082067e7356d185ab4ffe8ed3e3711e92' + '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" + 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() { @@ -46,5 +47,5 @@ package() { install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib" install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" - install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.html" }
\ No newline at end of file diff --git a/mechakeys.sh b/mechakeys.sh index 416737c7ed0c..c77c53567639 100644 --- a/mechakeys.sh +++ b/mechakeys.sh @@ -1,11 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron12 -APPDIR=/usr/lib/mechakeys -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${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 |