diff options
author | zxp19821005 | 2024-09-04 15:34:17 +0800 |
---|---|---|
committer | zxp19821005 | 2024-09-04 15:34:17 +0800 |
commit | be84f89cee65c1d5076ee1e8d3ff30706bcb3905 (patch) | |
tree | 4be2c41fde8df617590438ae32d3ebc690c02177 | |
download | aur-be84f89cee65c1d5076ee1e8d3ff30706bcb3905.tar.gz |
update to 1.0.56
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | jasper-km.sh | 29 |
3 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..437947b7461a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = jasper-km-bin + pkgdesc = Desktop app for Jasper KM. Uses electron to wrap a docker compose config. + pkgver = 1.0.56 + pkgrel = 1 + url = https://github.com/cjmalloy/jasper-app + arch = x86_64 + license = MIT + makedepends = fuse2 + makedepends = asar + depends = electron32 + depends = docker + depends = docker-compose + depends = nodejs + provides = jasper-km=1.0.56 + conflicts = jasper-km + source = jasper-km-1.0.56.AppImage::https://github.com/cjmalloy/jasper-app/releases/download/v1.0.56/Jasper-1.0.56.AppImage + source = LICENSE-1.0.56::https://raw.githubusercontent.com/cjmalloy/jasper-app/v1.0.56/LICENSE + source = jasper-km.sh + sha256sums = 844e6d39a995444b12940e33f4055ceee637e69b8664f7f30c609e18effbf756 + sha256sums = b841e587a43cbd61006192ad84d3af66c0344e51b882aa4e7efda427d2f30b73 + sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980 + +pkgname = jasper-km-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9e6d64bd7d87 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +_appname=jasper +pkgname="${_appname}-km-bin" +_pkgname=Jasper +pkgver=1.0.56 +_electronversion=32 +pkgrel=1 +pkgdesc="Desktop app for Jasper KM. Uses electron to wrap a docker compose config." +arch=('x86_64') +url="https://github.com/cjmalloy/jasper-app" +license=('MIT') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=( + "electron${_electronversion}" + 'docker' + 'docker-compose' + 'nodejs' +) +makedepends=( + 'fuse2' + 'asar' +) +source=( + "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/cjmalloy/jasper-app/v${pkgver}/LICENSE" + "${pkgname%-bin}.sh" +) +sha256sums=('844e6d39a995444b12940e33f4055ceee637e69b8664f7f30c609e18effbf756' + 'b841e587a43cbd61006192ad84d3af66c0344e51b882aa4e7efda427d2f30b73' + '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ + -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|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|${pkgname%-bin}|g;s|Icon=${_appname}-app|Icon=${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${_appname}-app.desktop" + find "${srcdir}/squashfs-root" -type d -exec chmod 755 {} \; +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}" + cp "${srcdir}/squashfs-root/resources/app" -r "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib" + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${_appname}-app.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png" + install -Dm644 "${srcdir}/squashfs-root/${_appname}-app.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}
\ No newline at end of file diff --git a/jasper-km.sh b/jasper-km.sh new file mode 100644 index 000000000000..40e422ca2ee7 --- /dev/null +++ b/jasper-km.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -o pipefail +_APPDIR="/usr/lib/@appname@" +_RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" +_OPTIONS="@options@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export ELECTRON_FORCE_IS_PACKAGED=true +export ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" +export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi +cd "${_APPDIR}" || { echo "Failed to change directory to ${_APPDIR}"; exit 1; } +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" +else + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" +fi
\ No newline at end of file |