summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d9b1795f265c18817c139baa8df215d74e967df (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
pkgname=g-desktop-suite-git
pkgver=0.2.1.r54.g7f6d54a
pkgrel=1
pkgdesc="Google Suite as a desktop app. Made possible with Electron."
arch=('any')
url="https://github.com/alexkim205/G-Desktop-Suite"
license=('MIT')
depends=('libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'libappindicator-gtk3' 'libsecret')
makedepends=('git' 'yarn')
provides=("${pkgname%-git}" 'gdesktopsuite')
conflicts=("${pkgname%-git}" 'gdesktopsuite')
source=("${pkgname%-git}::git+https://github.com/alexkim205/G-Desktop-Suite.git")
sha256sums=('SKIP')
 
pkgver() {
    cd "$srcdir/${pkgname%-git}"
    git describe --long --tags | sed 's/^v.conscious.club\///;s/\([^-]*-g\)/r\1/;s/-/./g'
}
 
build() {
    cd "$srcdir/${pkgname%-git}"
    export YARN_CACHE_FOLDER="$srcdir/yarn-cache"
    yarn install
    yarn electron-builder -l pacman
}
 
package() {
    cd "$srcdir/${pkgname%-git}"
    bsdtar -xf dist/gdesktopsuite-*.pacman -C "$pkgdir"
 
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
 
    ln -sf '/opt/G Desktop Suite/gdesktopsuite' '/usr/bin/gdesktopsuite'

    rm "$pkgdir"/.[^.]*
}