summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 357bf1110c89b59b8add77dcfc03f9ea1a81cb4a (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Bence HornĂ¡k <bence.hornak@gmail.com>

pkgname=theia-electron
pkgver=1.1.0
pkgrel=1
arch=('any')
url='https://www.theia-ide.org/'
pkgdesc="Cloud & Desktop IDE Platform"
license=('EPL2')
depends=('nodejs-lts-dubnium' 'nss' 'gtk3' 'libxss' 'libxkbfile')
makedepends=('yarn' 'make' 'gcc' 'pkgconf' 'python2' 'node-gyp')
optdepends=('git: git support')
options=(!strip) #to speed up build

source=(
  "theia-electron"
  "package.json"
  "theia-electron.desktop"
  "https://raw.githubusercontent.com/eclipse-theia/theia/v$pkgver/logo/theia.svg"
  "https://raw.githubusercontent.com/eclipse-theia/theia/v$pkgver/LICENSE"
)
md5sums=('c022f460c0d928df6c1ece9d3044b008'
         'e7f6ec77c96c13c45e5b691b539b1fca'
         'b316dead79fa33f45c8d689a1c940dab'
         '1dde0e422484895d3509f4ee9bb8d980'
         '6befbd553f609c8f4e48805013bc71c7')

build() {
  yarn install --cache-folder "$srcdir/yarn-cache"
  yarn build
  # Remove dev dependencies
  yarn install --cache-folder "$srcdir/yarn-cache" --production --ignore-scripts --prefer-offline
}

package() {
  # Create directory
  install -dm 755 "$pkgdir"/usr/lib/$pkgname

  # Source code (symlinks are not dereferenced)
  cp -r --no-preserve=ownership --preserve=mode \
      src-gen lib node_modules \
      "$pkgdir/usr/lib/$pkgname/"
  # package.json (should be dereferenced)
  install -Dm644 package.json "$pkgdir/usr/lib/$pkgname/"

  # Executable
  install -Dm755 theia-electron "$pkgdir/usr/bin/$pkgname"
  # Desktop file
  install -Dm644 theia-electron.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
  # Icon
  install -Dm644 theia.svg "$pkgdir"/usr/share/pixmaps/theia.svg

  # License
  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}