summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d61fd99a703773da41e1b257cb0bcb4ec1024559 (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
# Maintainer: Hoàng Văn Khải <hvksmr1996@gmail.com>

pkgname=code-server-noopts
pkgver=1.32.0_310
pkgrel=0
pkgdesc="Run VS Code on a remote server"
arch=('x86_64')
url="https://github.com/codercom/code-server"
license=(MIT)
depends=(net-tools bash)
conflicts=(code-server)
replaces=(code-server)
_ghtag=${pkgver//_/-}
_dirname=code-server-${_ghtag}-linux-x64
_nexe=usr/bin/code-server.nexe
source=(https://github.com/codercom/code-server/releases/download/${_ghtag}/${_dirname}.tar.gz)
sha512sums=(SKIP)
options=('!strip')

package() {
  cd "$srcdir"/${_dirname}

  (
    echo '#! /usr/bin/bash'
    echo 'unset NODE_OPTIONS'
    echo exec "'$pkgdir'"/$_nexe '$@'
  ) > launch.sh

  install -Dm755 launch.sh "$pkgdir"/usr/bin/code-server
  install -Dm755 code-server "$pkgdir"/$_nexe
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}