summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052025-01-15 11:19:44 +0800
committerzxp198210052025-01-15 11:19:44 +0800
commitefc423db42d2d0982be5e56fcd8f0fc0a85443c4 (patch)
treec4362e0772f144abbc01d4b3ddbe27086e33da6e
downloadaur-efc423db42d2d0982be5e56fcd8f0fc0a85443c4.tar.gz
update to 0.9.10
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD59
-rw-r--r--cherry-studio-electron.sh29
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cbc042aef9d3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = cherry-studio-electron-bin
+ pkgdesc = 🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.(Prebuilt version.Use system-wide electron)
+ pkgver = 0.9.10
+ pkgrel = 1
+ url = https://cherry-ai.com/
+ arch = aarch64
+ arch = x86_64
+ license = MIT
+ makedepends = asar
+ makedepends = fuse2
+ depends = electron31
+ provides = cherry-studio=0.9.10
+ conflicts = cherry-studio
+ source = LICENSE-0.9.10::https://raw.githubusercontent.com/CherryHQ/cherry-studio/v0.9.10/LICENSE
+ source = cherry-studio-electron.sh
+ sha256sums = 46449e64b0b5594a3ea9e808beaad744523e325dce6a5ba8b208c5d0f5156b70
+ sha256sums = 291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980
+ source_aarch64 = cherry-studio-electron-0.9.10-aarch64.AppImage::https://github.com/CherryHQ/cherry-studio/releases/download/v0.9.10/Cherry-Studio-0.9.10-arm64.AppImage
+ sha256sums_aarch64 = 12a9511582fc5d81f2fda95b49e1c4baa69e8c28bdc02d7f9dcc5085f305415a
+ source_x86_64 = cherry-studio-electron-0.9.10-x86_64.AppImage::https://github.com/CherryHQ/cherry-studio/releases/download/v0.9.10/Cherry-Studio-0.9.10-x86_64.AppImage
+ sha256sums_x86_64 = 83d0aff4468c1e2371a19514401450bbc8351b08173e56d140c91c8a655d4a10
+
+pkgname = cherry-studio-electron-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..291443bceae6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+_appname=cherry-studio
+pkgname="${_appname}-electron-bin"
+_pkgname=Cherry-Studio
+pkgver=0.9.10
+_electronversion=31
+pkgrel=1
+pkgdesc="🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.(Prebuilt version.Use system-wide electron)"
+arch=(
+ 'aarch64'
+ 'x86_64'
+)
+url="https://cherry-ai.com/"
+_ghurl="https://github.com/CherryHQ/cherry-studio"
+license=('MIT')
+provides=("${_appname}=${pkgver}")
+conflicts=("${_appname}")
+depends=(
+ "electron${_electronversion}"
+)
+makedepends=(
+ 'asar'
+ 'fuse2'
+)
+source=(
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/CherryHQ/cherry-studio/v${pkgver}/LICENSE"
+ "${pkgname%-bin}.sh"
+)
+source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-arm64.AppImage")
+source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-x86_64.AppImage")
+sha256sums=('46449e64b0b5594a3ea9e808beaad744523e325dce6a5ba8b208c5d0f5156b70'
+ '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
+sha256sums_aarch64=('12a9511582fc5d81f2fda95b49e1c4baa69e8c28bdc02d7f9dcc5085f305415a')
+sha256sums_x86_64=('83d0aff4468c1e2371a19514401450bbc8351b08173e56d140c91c8a655d4a10')
+prepare() {
+ sed -e "
+ s/@electronversion@/${_electronversion}/g
+ s/@appname@/${pkgname%-bin}/g
+ s/@runname@/app.asar/g
+ s/@cfgdirname@/${_pkgname//-/}/g
+ s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
+ " -i "${srcdir}/${pkgname%-bin}.sh"
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
+ sed -e "
+ s/AppRun --no-sandbox/${pkgname%-bin}/g
+ s/Icon=${_appname//-/}/Icon=${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}"
+ cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${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//-/}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
+ install -Dm644 "${srcdir}/squashfs-root/${_appname//-/}.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/cherry-studio-electron.sh b/cherry-studio-electron.sh
new file mode 100644
index 000000000000..40e422ca2ee7
--- /dev/null
+++ b/cherry-studio-electron.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