summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-04-06 10:29:14 +0800
committerzxp198210052024-04-06 10:29:14 +0800
commit20dd66c4c660f9fbed1d77c2859d465110e61634 (patch)
tree47d7150df1c2a2a793587acaeb3a31a18eb9a473
downloadaur-20dd66c4c660f9fbed1d77c2859d465110e61634.tar.gz
update to 1.2.1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD46
-rw-r--r--ai-chat.sh16
3 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65f8b283364b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ai-chat-bin
+ pkgdesc = A cross-platform desktop application that provides quick access to chatbots like OpenAI ChatGPT from the menu bar (tray)
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://www.chatbar.top/
+ arch = x86_64
+ license = LicenseRef-unknown
+ makedepends = fuse2
+ depends = electron28
+ provides = ai-chat=1.2.1
+ conflicts = ai-chat
+ source = ai-chat-1.2.1.AppImage::https://github.com/rabrain/ai-chat/releases/download/v1.2.1/AI-Chat-1.2.1-linux-x86_64.AppImage
+ source = ai-chat.sh
+ sha256sums = 17ec960cf353bbc4567d952f1eb4eed3730ac1e1722237fbe4d5104281c2bddb
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+
+pkgname = ai-chat-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..00b82bfa19d0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=ai-chat-bin
+_pkgname="AI Chat"
+pkgver=1.2.1
+_electronversion=28
+pkgrel=1
+pkgdesc="A cross-platform desktop application that provides quick access to chatbots like OpenAI ChatGPT from the menu bar (tray)"
+arch=('x86_64')
+url="https://www.chatbar.top/"
+_ghurl="https://github.com/rabrain/ai-chat"
+license=('LicenseRef-unknown')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+)
+makedepends=(
+ 'fuse2'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname// /-}-${pkgver}-linux-${CARCH}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('17ec960cf353bbc4567d952f1eb4eed3730ac1e1722237fbe4d5104281c2bddb'
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+build() {
+ 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=${_pkgname}|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${_pkgname}.desktop"
+}
+package() {
+ 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"
+ 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"
+ for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
+ done
+ install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
+ install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+} \ No newline at end of file
diff --git a/ai-chat.sh b/ai-chat.sh
new file mode 100644
index 000000000000..7ddcaab8d734
--- /dev/null
+++ b/ai-chat.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