diff options
author | ml | 2021-02-16 03:45:56 +0100 |
---|---|---|
committer | ml | 2021-02-24 10:21:54 +0100 |
commit | 5db9bb0f1762e4e257b13dd4a333129747ab4262 (patch) | |
tree | 7708cb5f6df7b3c968af7f5684eb37e9a67ff5d0 | |
download | aur-5db9bb0f1762e4e257b13dd4a333129747ab4262.tar.gz |
upgpkg google-chat-linux 5.11.9+2-1
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | google-chat-linux.desktop | 10 | ||||
-rw-r--r-- | google-chat-linux.sh | 2 | ||||
-rw-r--r-- | sandbox.patch | 12 |
6 files changed, 114 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e4ab3aa7bfbd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = google-chat-linux + pkgdesc = Unofficial electron-based desktop client for Google Chat, electron not included + pkgver = 5.11.9+2 + pkgrel = 1 + url = https://github.com/squalou/google-chat-linux + arch = any + license = custom:UNKNOWN + makedepends = jq + makedepends = npm + depends = electron + source = https://github.com/squalou/google-chat-linux/archive/5.11.9-2/google-chat-linux-5.11.9-2.tar.gz + source = google-chat-linux.sh + source = google-chat-linux.desktop + source = sandbox.patch + sha256sums = 9f81278d94dc2c9e1a5befc4be107813d75f9aca67ea1cc3fe5f43b4f87a4468 + sha256sums = 5a458e5d7193784383ceda44faf8852410296f310acb5495d53c16bd0ea50059 + sha256sums = c7fdfa74422ce7900563fd1a0f5d76c4d4cd6d153ca3b28ab5a8912a33cba9c7 + sha256sums = e4b63ca04f05b03de70fd7440981646ae7eb778fa749fd8ac26dd545833b0a43 + +pkgname = google-chat-linux + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ddae9e830354 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +!PKGBUILD +!.SRCINFO +!*.desktop +!*.sh +!*.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cd7005db2acd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: ml <> +pkgname=google-chat-linux +_pkgver='5.11.9-2' +pkgver=${_pkgver/-/+} +pkgrel=1 +pkgdesc='Unofficial electron-based desktop client for Google Chat, electron not included' +arch=('any') +url='https://github.com/squalou/google-chat-linux' +license=('custom:UNKNOWN') +depends=('electron') +makedepends=('jq' 'npm') +source=("${url}/archive/${_pkgver}/${pkgname}-${_pkgver}.tar.gz" + google-chat-linux.sh + google-chat-linux.desktop + sandbox.patch) +sha256sums=('9f81278d94dc2c9e1a5befc4be107813d75f9aca67ea1cc3fe5f43b4f87a4468' + '5a458e5d7193784383ceda44faf8852410296f310acb5495d53c16bd0ea50059' + 'c7fdfa74422ce7900563fd1a0f5d76c4d4cd6d153ca3b28ab5a8912a33cba9c7' + 'e4b63ca04f05b03de70fd7440981646ae7eb778fa749fd8ac26dd545833b0a43') + + +_patch_package_json() { + mv package.json package.json.orig + jq --arg version "$(</usr/lib/electron/version)" -f /dev/stdin package.json.orig <<'EOF' >package.json +del(.devDependencies.electron) | +.build *= { + "electronDist": "/usr/lib/electron", + "electronVersion": $version, + "files": [ + "assets", + "src" + ] +} +EOF +} + +_npm() { npm --no-audit --no-fund --no-update-notifier --cache="$srcdir/npm-cache" "$@"; } +prepare() { + cd "$pkgname-$_pkgver" + patch -Np1 < ../sandbox.patch + _patch_package_json + _npm install +} + +build() { + cd "$pkgname-$_pkgver" + export NODE_ENV=production + _npm run-script pack +} + +package() { + install -Dm755 "$pkgname".sh "$pkgdir"/usr/bin/"$pkgname" + install -Dm644 "$pkgname".desktop -t "${pkgdir}/usr/share/applications" + + cd "$pkgname-$_pkgver" + install -Dm644 dist/linux-unpacked/resources/app.asar "$pkgdir"/usr/lib/"$pkgname".asar + + for i in build/icons/*.png; do + : "${i##*/}" + install -Dm644 "$i" "$pkgdir/usr/share/icons/hicolor/${_%.png}x${_%.png}/apps/$pkgname.png" + done + #install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/google-chat-linux.desktop b/google-chat-linux.desktop new file mode 100644 index 000000000000..8eff95ef9f16 --- /dev/null +++ b/google-chat-linux.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Google Chat +Comment=Unofficial Google Chat Electron app +Exec=/usr/bin/google-chat-linux +Icon=google-chat-linux +Terminal=false +StartupNotify=false +Categories=Application; diff --git a/google-chat-linux.sh b/google-chat-linux.sh new file mode 100644 index 000000000000..a435e2881781 --- /dev/null +++ b/google-chat-linux.sh @@ -0,0 +1,2 @@ +#!/usr/bin/sh +exec electron /usr/lib/google-chat-linux.asar "$@" diff --git a/sandbox.patch b/sandbox.patch new file mode 100644 index 000000000000..fe784b40d2f0 --- /dev/null +++ b/sandbox.patch @@ -0,0 +1,12 @@ +diff -ura package.orig/src/index.js package.new/src/index.js +--- package.orig/src/index.js 2021-01-29 14:08:30.000000000 +0100 ++++ package.new/src/index.js 2021-02-16 03:27:41.880131306 +0100 +@@ -7,8 +7,6 @@ + const applicationVersion = require('./../package.json').version; + let mainWindow, systemTrayIcon, config, contextMenu; + +-process.env.NODE_OPTIONS="--no-force-async-hooks-checks"; +-process.env.ELECTRON_DISABLE_SANDBOX=true; + + process.title = 'Google Chat Linux (Unofficial)'; + console.log(process.title + ' - v' + applicationVersion); |