diff options
author | Misha | 2022-07-27 15:48:31 -0400 |
---|---|---|
committer | Misha | 2022-07-27 15:49:57 -0400 |
commit | 64a6529fa2a78f3283d820fb0cc38721b743c711 (patch) | |
tree | fe0e303c0b8cb6bfaaf97b0e01cef7d1f214cfb1 | |
download | aur-64a6529fa2a78f3283d820fb0cc38721b743c711.tar.gz |
Add new package
-rw-r--r-- | .SRCINFO | 21 | ||||
-rwxr-xr-x | .gitignore | 31 | ||||
-rwxr-xr-x | GoogleColab.desktop | 11 | ||||
-rwxr-xr-x | PKGBUILD | 36 | ||||
-rwxr-xr-x | build.js | 38 | ||||
-rwxr-xr-x | colab-desktop | 3 |
6 files changed, 140 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b07f6d9e1ffd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = colab-desktop + pkgdesc = Google Colab desktop webapp wrapper + pkgver = 1.0 + pkgrel = 2 + url = https://colab.research.google.com/ + arch = any + license = MIT + makedepends = npm + makedepends = icoutils + depends = electron + replaces = colab-chromium-desktop + source = build.js + source = colab-desktop + source = GoogleColab.desktop + source = https://colab.research.google.com/img/favicon.ico + sha256sums = 8a248e77ef7a0a6058d45a3b3c3b2e02ae563332d313fbaae2da8e4baf21f33f + sha256sums = f72bd81379a65d7825fc7a2c5cef141330380b16b1fd3dceefcc50dde812c7f7 + sha256sums = 7c5cd5852cc603e45a99cf2e9787a150ec8717b0477ea8d57daa5193a0b79a53 + sha256sums = 52232ddc81832d3edc91776ac1bc587fc40c91dc633e00b5f911466ad1c67f3a + +pkgname = colab-desktop diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000000..4df5a0502162 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +*.tar +*.tar.* +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +pkg/ +src/ + +*~ + +.fuse_hidden* + +.Trash-* + +[._]*.s[a-v][a-z] +!*.svg +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +.vscode/* +!.vscode/tasks.json +!.vscode/launch.json +*.code-workspace diff --git a/GoogleColab.desktop b/GoogleColab.desktop new file mode 100755 index 000000000000..8c802acd8fab --- /dev/null +++ b/GoogleColab.desktop @@ -0,0 +1,11 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version = 1.0 +Type = Application +Terminal = false +Name = "Google Colab" +Comment = Cloud Python Notebook Environment +Exec = electron /usr/share/colab-desktop/app.asar "$@" +Icon = googlecolab +Categories = Science;Development;IDE;ArtificialIntelligence +Keywords = python;jupyter diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..618f02e3ffa8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Misha <mishakmak at gmail dot com> + +pkgname=colab-desktop +pkgver=1.0 +pkgrel=2 +pkgdesc="Google Colab desktop webapp wrapper" +arch=('any') +url="https://colab.research.google.com/" +license=('MIT') +depends=('electron') +makedepends=('npm' 'icoutils') +replaces=('colab-chromium-desktop') +source=('build.js' 'colab-desktop' 'GoogleColab.desktop' 'https://colab.research.google.com/img/favicon.ico') +sha256sums=('8a248e77ef7a0a6058d45a3b3c3b2e02ae563332d313fbaae2da8e4baf21f33f' + 'f72bd81379a65d7825fc7a2c5cef141330380b16b1fd3dceefcc50dde812c7f7' + '7c5cd5852cc603e45a99cf2e9787a150ec8717b0477ea8d57daa5193a0b79a53' + '52232ddc81832d3edc91776ac1bc587fc40c91dc633e00b5f911466ad1c67f3a') + +build() { + cd "$srcdir" + sed -i "s/SYS_ELECTRON_VERS/$(tail /usr/lib/electron/version)/" build.js + icotool -x favicon.ico + cp favicon_1_128x128x32.png googlecolab.png + npm install nativefier + node build.js +} + +package() { + cd "$srcdir" + install -Dm644 GoogleColab-linux-*/resources/app.asar -t "$pkgdir/usr/share/colab-desktop/" + install -Dm755 "colab-desktop" -t "$pkgdir/usr/bin/" + install -Dm644 "GoogleColab.desktop" -t "$pkgdir/usr/share/applications/" + install -Dm644 "favicon_1_128x128x32.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/googlecolab.png" + install -Dm644 "favicon_2_32x32x32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/googlecolab.png" + install -Dm644 "favicon_3_16x16x32.png" "$pkgdir/usr/share/icons/hicolor/16x16/apps/googlecolab.png" +} diff --git a/build.js b/build.js new file mode 100755 index 000000000000..b2432f9c4657 --- /dev/null +++ b/build.js @@ -0,0 +1,38 @@ +var nativefier = require('nativefier').default; + +// possible options, defaults unless specified otherwise +var options = { + name: 'Google Colab', // will be inferred if not specified + targetUrl: 'https://colab.research.google.com', // required + platform: 'linux', + //arch: 'x64', + electronVersion: 'SYS_ELECTRON_VERS', + out: '.', + asar: true, // see conceal + icon: 'googlecolab.png', + showMenuBar: false, + width: 1280, + height: 800, + ignoreCertificate: false, + ignoreGpuBlacklist: false, + enableEs3Apis: true, + internalUrls: '.*?\.google\.*?', + blockExternalUrls: false, + insecure: false, + userAgent: 'firefox', + honest: false, + zoom: 1.0, + singleInstance: false, + clearCache: false, + fileDownloadOptions: { + saveAs: true, // always show "Save As" dialog + }, +}; + +nativefier(options, function (error, appPath) { + if (error) { + console.error(error); + throw `Nativefier failed with error ${error}`; + } + console.log('App has been successfully nativefied'); +}); diff --git a/colab-desktop b/colab-desktop new file mode 100755 index 000000000000..1b40dcbaa319 --- /dev/null +++ b/colab-desktop @@ -0,0 +1,3 @@ +#!/bin/sh + +exec electron /usr/share/colab-desktop/app.asar "$@" |