summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee293c741d5dcf61763f4a41faf06e7c5ea4d61f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Marat Talipov <t-marat@yandex.ru>
# Based on package "google-docs-nativefier"

pkgname=google-slides-nativefier
pkgver=21.06.10
pkgrel=1
pkgdesc="Electron wrapper for the Google Slides web application"
arch=(x86_64)
license=(MIT)
url=https://slides.google.com
source=($pkgname.png
        $pkgname.desktop)
makedepends=(nodejs nodejs-nativefier npm unzip)
sha256sums=('faafa258b255df313ec807447f87fde903d9b4b560cb83025d1396c5a07fe517'
            'd453eca9594c39cbb6de6910ca410878e4c381fd7b8845f9db09341435b88f7c')

_instname=GoogleSlides

# в internal-urls нужно включать и docs.google.com, и slides.google.com.
# потому что корневая страница приложения slides.google.com, но когда открываешь слайд на редактирование он открывается в docs.google.com
# если не добавить docs.google.com, тогда будет открываться в дефолтном браузере.
build() {
    nativefier "https://slides.google.com/" \
      --icon $pkgname.png \
      --maximize \
      --name "$_instname" \
      --user-agent "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0" \
      --internal-urls "(.*?docs\.google\.com.*?|.*?slides\.google\.com.*?|.*?accounts\.google\.com.*?)"
}

package() {   
    install -d "$pkgdir"/opt "$pkgdir"/usr/{bin,share/pixmaps}
    install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$_instname.desktop

    cp -rL $_instname-linux-* "$pkgdir"/opt/$pkgname
    ln -sf /opt/$pkgname/$_instname "$pkgdir"/usr/bin/$_instname
    ln -sf /opt/$pkgname/resources/app/icon.png "$pkgdir"/usr/share/pixmaps/$_instname.png

    chmod 666 "$pkgdir"/opt/$pkgname/resources/app/nativefier.json
}