summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-04-02 18:38:40 +0800
committerzxp198210052024-04-02 18:38:40 +0800
commit753846ac3cb82aa6d3d138cf4a75edb65914a459 (patch)
tree05233b698fbd05cd53697ff3d691968fa7a56519
downloadaur-koala-client-bin.tar.gz
update to 2.1.0
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD43
-rw-r--r--koala-client.sh16
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9a6b2aa0e36b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = koala-client-bin
+ pkgdesc = OpenAI API user interface allowing seamless integration of generative AI into your workflow
+ pkgver = 2.1.0
+ pkgrel = 1
+ url = https://client.koaladev.io/
+ arch = x86_64
+ license = CC0-1.0
+ makedepends = fuse2
+ depends = electron28
+ provides = koala-client=2.1.0
+ conflicts = koala-client
+ source = koala-client-2.1.0.AppImage::https://github.com/jackschedel/KoalaClient/releases/download/ae8839d68752de962ab3db1ac574a0fdad126bee-7950588014/KoalaClient-2.1.0-linux-x86_64.AppImage
+ source = koala-client.sh
+ sha256sums = 898dcf14e8152bbb9df09b304c397e5d7d83ff092dff091274acdbebf5f0df36
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+
+pkgname = koala-client-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8cb94439c841
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=koala-client-bin
+_pkgname=KoalaClient
+pkgver=2.1.0
+_electronversion=28
+pkgrel=1
+pkgdesc="OpenAI API user interface allowing seamless integration of generative AI into your workflow"
+arch=('x86_64')
+url="https://client.koaladev.io/"
+_ghurl="https://github.com/jackschedel/KoalaClient"
+license=('CC0-1.0')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+)
+makedepends=(
+ 'fuse2'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/ae8839d68752de962ab3db1ac574a0fdad126bee-7950588014/${_pkgname}-${pkgver}-linux-${CARCH}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('898dcf14e8152bbb9df09b304c397e5d7d83ff092dff091274acdbebf5f0df36'
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@runname@|app.asar|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|Chat;|Utility;|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${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/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
+ install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+} \ No newline at end of file
diff --git a/koala-client.sh b/koala-client.sh
new file mode 100644
index 000000000000..7ddcaab8d734
--- /dev/null
+++ b/koala-client.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+_APPDIR="/usr/lib/@appname@"
+_RUNNAME="${_APPDIR}/@runname@"
+_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 NODE_ENV=production
+cd "${_APPDIR}"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
+else
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
+fi \ No newline at end of file