summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD16
-rw-r--r--perplexity-ai-app.sh5
3 files changed, 20 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c13fce5a09dc..c6586a8f2a5e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = perplexity-ai-app
pkgdesc = The Unofficial Perplexity AI Desktop App, powered by Electron which brings the magic of AI language processing to your desktop.
pkgver = 2.1.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/inulute/perplexity-ai-app
arch = any
license = MIT
@@ -9,11 +9,12 @@ pkgbase = perplexity-ai-app
makedepends = nodejs
makedepends = gendesk
makedepends = git
+ makedepends = curl
depends = electron22
conflicts = perplexity-ai-app
source = perplexity-ai-app.git::git+https://github.com/inulute/perplexity-ai-app.git#tag=v2.1.0
source = perplexity-ai-app.sh
- sha256sums = SKIP
- sha256sums = 50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe
+ sha256sums = 875686f084c613d9a5d4dd71bcf60af81da62a141690c869a7e70b06bb65290f
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
pkgname = perplexity-ai-app
diff --git a/PKGBUILD b/PKGBUILD
index f7d7c39dbefb..902822c78f53 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=perplexity-ai-app
pkgver=2.1.0
_electronversion=22
-pkgrel=2
+pkgrel=3
pkgdesc="The Unofficial Perplexity AI Desktop App, powered by Electron which brings the magic of AI language processing to your desktop."
arch=('any')
url="https://github.com/inulute/perplexity-ai-app"
@@ -16,17 +16,19 @@ makedepends=(
'nodejs'
'gendesk'
'git'
+ 'curl'
)
source=(
"${pkgname}.git::git+${url}.git#tag=v${pkgver}"
"${pkgname}.sh"
)
-sha256sums=('SKIP'
- '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe')
+sha256sums=('875686f084c613d9a5d4dd71bcf60af81da62a141690c869a7e70b06bb65290f'
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@options@||g" \
-i "${srcdir}/${pkgname}.sh"
gendesk -f -n -q --categories="Utility" --name="${pkgname}" --exec="${pkgname} %U"
cd "${srcdir}/${pkgname}.git"
@@ -38,6 +40,14 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
+ if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then
+ echo 'registry="https://registry.npmmirror.com/"' >> .npmrc
+ echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc
+ echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc
+ else
+ echo "Your network is OK."
+ fi
+ sed "s|AppImage|dir|g" -i package.json
npm install --force
npm run package-linux
}
diff --git a/perplexity-ai-app.sh b/perplexity-ai-app.sh
index 86cb3dc6a9bf..7ddcaab8d734 100644
--- a/perplexity-ai-app.sh
+++ b/perplexity-ai-app.sh
@@ -2,6 +2,7 @@
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
@@ -9,7 +10,7 @@ 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}" "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
else
- exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
fi \ No newline at end of file