void-packages/srcpkgs/pyright/template

43 lines
1.1 KiB
Bash

# Template file for 'pyright'
pkgname=pyright
version=1.1.362
revision=1
build_wrksrc="packages/pyright"
hostmakedepends="nodejs python3"
depends="nodejs"
short_desc="Static type checker and language server for Python"
maintainer="classabbyamp <void@placeviolette.net>"
license="MIT"
homepage="https://microsoft.github.io/pyright"
changelog="https://github.com/microsoft/pyright/releases"
distfiles="https://github.com/microsoft/pyright/archive/refs/tags/${version}.tar.gz"
checksum=5d186a4df2478c1a6e932b3ef2137752225d3301c8e25d3f3ae0976e5da57724
case "$XBPS_TARGET_MACHINE" in
i686*) broken="lerna doesn't support i686" ;;
esac
do_configure() {
cd "$wrksrc"
npm ci
}
do_build() {
npm run build
}
do_install() {
local _targetdir="/usr/lib/pyright"
vmkdir "$_targetdir"
vinstall index.js 755 "$_targetdir"
vinstall langserver.index.js 755 "$_targetdir"
vinstall package.json 644 "$_targetdir"
vcopy dist "$_targetdir"
vmkdir /usr/bin
ln -s "$_targetdir/index.js" "${DESTDIR}/usr/bin/pyright"
ln -s "$_targetdir/langserver.index.js" "${DESTDIR}/usr/bin/pyright-langserver"
vlicense "$wrksrc/LICENSE.txt"
}