yochananmarqos

g-desktop-suite-git

May 20th, 2020 (edited)
182
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=g-desktop-suite-git
  2. pkgver=0.3.1.r7.gf62994c
  3. pkgrel=1
  4. pkgdesc="Google Suite as a desktop app. Made possible with Electron."
  5. arch=('any')
  6. url="https://github.com/alexkim205/G-Desktop-Suite"
  7. license=('MIT')
  8. depends=( 'nss' 'libxss' 'gtk3')
  9. makedepends=('git' 'yarn')
  10. provides=("${pkgname%-git}" 'gdesktopsuite')
  11. conflicts=("${pkgname%-git}" 'gdesktopsuite')
  12. source=("${pkgname%-git}::git+https://github.com/alexkim205/G-Desktop-Suite.git")
  13. sha256sums=('SKIP')
  14.  
  15. pkgver() {
  16.     cd "$srcdir/${pkgname%-git}"
  17.     git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  18. }
  19.  
  20. build() {
  21.     cd "$srcdir/${pkgname%-git}"
  22.     export YARN_CACHE_FOLDER="$srcdir/yarn-cache"
  23.     yarn install
  24.     yarn electron-builder -l pacman
  25. }
  26.  
  27. package() {
  28.     cd "$srcdir/${pkgname%-git}"
  29.     bsdtar -xf dist/*.pacman -C "$pkgdir"
  30.  
  31.     install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
  32.  
  33.     # Link to the binary
  34.     install -d "$pkgdir/usr/bin"
  35.     ln -sf '/opt/G Desktop Suite/gdesktopsuite' "$pkgdir/usr/bin/gdesktopsuite"
  36.  
  37.     rm "$pkgdir"/.[^.]*
  38. }
RAW Paste Data