summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--google-chat-linux.sh8
3 files changed, 16 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4f192187d930..65e17977a4b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = google-chat-linux
pkgdesc = Unofficial electron-based desktop client for Google Chat, electron not included
pkgver = 5.29.23_1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/squalou/google-chat-linux
arch = any
license = LicenseRef-unknown
@@ -14,6 +14,6 @@ pkgbase = google-chat-linux
source = google-chat-linux.git::git+https://github.com/squalou/google-chat-linux.git#tag=5.29.23-1
source = google-chat-linux.sh
sha256sums = SKIP
- sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
pkgname = google-chat-linux
diff --git a/PKGBUILD b/PKGBUILD
index 758ef4515493..f2be3ab07e6c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _pkgname="Google Chat Linux"
pkgver=5.29.23_1
_electronversion=29
_nodeversion=18
-pkgrel=1
+pkgrel=2
pkgdesc='Unofficial electron-based desktop client for Google Chat, electron not included'
arch=('any')
url='https://github.com/squalou/google-chat-linux'
@@ -26,7 +26,7 @@ source=(
"${pkgname}.sh"
)
sha256sums=('SKIP'
- '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
@@ -37,6 +37,7 @@ 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"
_ensure_local_nvm
gendesk -q -f -n --categories="Network" --name="${pkgname}" --exec="${pkgname} %U"
@@ -49,13 +50,18 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
+ if [ `curl ifconfig.co/country` == "China" ];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
+ fi
sed -e '/--no-force-async-hooks-checks/d' -e '/ELECTRON_DISABLE_SANDBOX/d' -i src/index.js
sed -e "s|normal-64.png|..\/..\/..\/..\/${pkgname}\/icon\/default\/normal-64.png|g" \
-e "s|badge-64.png|..\/..\/..\/..\/${pkgname}\/icon\/default\/badge-64.png|g" \
-e "s|offline-64.png|..\/..\/..\/..\/${pkgname}\/icon\/default\/offline-64.png|g" \
-i src/paths.js
npm install
- npx electron-builder --linux AppImage
+ npx electron-builder -l AppImage
}
package() {
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
diff --git a/google-chat-linux.sh b/google-chat-linux.sh
index f9ced1432cfc..7ddcaab8d734 100644
--- a/google-chat-linux.sh
+++ b/google-chat-linux.sh
@@ -1,14 +1,16 @@
-#!/bin/sh
+#!/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}" "$@" || 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