summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0714c4d57f9b49afd76a90bdcfffbd1cfb5c4a0a (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
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=microsoft-python-language-server
pkgver=2019.1
pkgrel=1
pkgdesc="Microsoft Language Server for Python"
url="https://github.com/Microsoft/python-language-server"
arch=(any)
license=(Apache)
depends=(dotnet-runtime)
makedepends=(dotnet-sdk)
source=("$pkgname::git+$url#tag=$pkgver")
sha256sums=('SKIP')
validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23')

prepare() {
  cd $pkgname/src/LanguageServer/Impl
  dotnet restore
}

build() {
  cd $pkgname/src/LanguageServer/Impl
  dotnet build -c Release --no-restore
}

package() {
  cd $pkgname/src/LanguageServer/Impl
  dotnet publish -c Release --no-build -o "$pkgdir/usr/lib/$pkgname"
  install -D /dev/stdin "$pkgdir/usr/bin/mspyls" <<END
#!/bin/sh
exec dotnet /usr/lib/$pkgname/Microsoft.Python.LanguageServer.dll "\$@"
END
}