diff options
author | zxp19821005 | 2023-08-30 13:14:36 +0800 |
---|---|---|
committer | zxp19821005 | 2023-08-30 13:14:36 +0800 |
commit | ca4479f68ca7cdb3fff0365be61fd9de604ae1f8 (patch) | |
tree | d8973dd7994f4baf5fba62293e1d79fd37bc1315 | |
download | aur-ca4479f68ca7cdb3fff0365be61fd9de604ae1f8.tar.gz |
update to 1.0.0
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | macchatgpt.sh | 8 |
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..56d5f950befc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = macchatgpt + pkgdesc = A macOS, Windows and Linux desktop application which runs ChatGPT easily and free of charge. + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/justinhartman/MacChatGPT + arch = x86_64 + license = custom + makedepends = gendesk + makedepends = npm + makedepends = nodejs + depends = bash + depends = electron23 + conflicts = macchatgpt + source = macchatgpt-1.0.0.tar.gz::https://github.com/justinhartman/MacChatGPT/archive/refs/tags/1.0.0.tar.gz + source = macchatgpt.sh + sha256sums = 3fbbec7720b52c2a39138fdd3f9d74a947527c36ba07348082cf491cf2f192a1 + sha256sums = 4edfc8cd3e7befed183ac9255e24d6cb7362bd3a0974fb1869ebfa235c8e8a43 + +pkgname = macchatgpt diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..06ba72a058b8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=macchatgpt +_pkgname=MacChatGPT +pkgver=1.0.0 +pkgrel=1 +pkgdesc="A macOS, Windows and Linux desktop application which runs ChatGPT easily and free of charge." +arch=('x86_64') +url="https://github.com/justinhartman/MacChatGPT" +license=("custom") +conflicts=("${pkgname}") +depends=('bash' 'electron23') +makedepends=('gendesk' 'npm' 'nodejs') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz" + "${pkgname}.sh") +sha256sums=('3fbbec7720b52c2a39138fdd3f9d74a947527c36ba07348082cf491cf2f192a1' + '4edfc8cd3e7befed183ac9255e24d6cb7362bd3a0974fb1869ebfa235c8e8a43') +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + npm install + npm run package:linux:x64 + asar pack "${srcdir}/${_pkgname}-${pkgver}/dist/build/${_pkgname}-linux-x64/resources/app" "${srcdir}/${pkgname}.asar" +} +package() { + install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}.asar" -t "${pkgdir}/opt/${pkgname}" + gendesk -f -n --categories "Utility" --name "${_pkgname}" --exec "${pkgname}" + install -Dm644 "${srcdir}/${_pkgname}-${pkgver}/assets/icons/png/512x512.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" + install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications" + install -Dm644 "${srcdir}/${_pkgname}-${pkgver}/dist/build/${_pkgname}-linux-x64/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/macchatgpt.sh b/macchatgpt.sh new file mode 100644 index 000000000000..a29664049e50 --- /dev/null +++ b/macchatgpt.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron23 +_ASAR="/opt/macchatgpt/macchatgpt.asar" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec ${_ELECTRON} ${_ASAR} "$@" +else + exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" +fi
\ No newline at end of file |