diff options
author | zxp19821005 | 2024-04-02 18:55:56 +0800 |
---|---|---|
committer | zxp19821005 | 2024-04-02 18:55:56 +0800 |
commit | d06432422102a6ff5ffb009b1f36c90ed56d1a21 (patch) | |
tree | 878d97361ed334ac96f0e942d4b14fad991d584d | |
download | aur-d06432422102a6ff5ffb009b1f36c90ed56d1a21.tar.gz |
update to 0.0.4
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | chatspot.sh | 16 |
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2b8adc5cc58c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = chatspot-bin + pkgdesc = An AI-powered, Spotlight assistant designed to help users complete tasks quickly and efficiently. + pkgver = 0.0.4 + pkgrel = 1 + url = https://github.com/gusye1234/chat-spot + arch = x86_64 + license = MIT + makedepends = fuse2 + depends = electron26-bin + provides = chatspot=0.0.4 + conflicts = chatspot + source = chatspot-0.0.4.AppImage::https://github.com/gusye1234/chat-spot/releases/download/v0.0.4/ChatSpot-0.0.4.AppImage + source = LICENSE-0.0.4::https://raw.githubusercontent.com/gusye1234/chat-spot/v0.0.4/LICENSE + source = chatspot.sh + sha256sums = d19d394cc7bd4cb6b7d4c07165ba549287724c290868dcc5cc871e33e8ccd271 + sha256sums = 5e98c15fe806a18f79422d2cd0c4587129f4e03081b5ab4c030627d6f6840d68 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + +pkgname = chatspot-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9bacfc878b7e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +_appname=chat-spot +pkgname="${_appname//-/}-bin" +_pkgname=ChatSpot +pkgver=0.0.4 +_electronversion=26 +pkgrel=1 +pkgdesc="An AI-powered, Spotlight assistant designed to help users complete tasks quickly and efficiently. " +arch=('x86_64') +url="https://github.com/gusye1234/chat-spot" +license=('MIT') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=( + "electron${_electronversion}-bin" +) +makedepends=( + 'fuse2' +) +source=( + "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/gusye1234/chat-spot/v${pkgver}/LICENSE" + "${pkgname%-bin}.sh" +) +sha256sums=('d19d394cc7bd4cb6b7d4c07165ba549287724c290868dcc5cc871e33e8ccd271' + '5e98c15fe806a18f79422d2cd0c4587129f4e03081b5ab4c030627d6f6840d68' + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app.asar|g" \ + -e "s|@options@||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|${_appname}|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${_appname}.desktop" + find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; +} +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" + cp -r "${srcdir}/squashfs-root/resources/"{app.asar.unpacked,assets} "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png" + install -Dm644 "${srcdir}/squashfs-root/${_appname}.desktop" -t "${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/chatspot.sh b/chatspot.sh new file mode 100644 index 000000000000..7ddcaab8d734 --- /dev/null +++ b/chatspot.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 |