58 lines
1.5 KiB
Bash
58 lines
1.5 KiB
Bash
# Template file for 'pyright'
|
|
pkgname=pyright
|
|
version=1.1.385
|
|
revision=1
|
|
build_wrksrc="packages/pyright"
|
|
hostmakedepends="nodejs python3-setuptools pkg-config"
|
|
makedepends="libsecret-devel"
|
|
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=0be2cf3b2ebbadde203a2e7e1f3e23017aa58bb43bfd1e45a08afbd1dea49c2e
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) broken="lerna doesn't support i686" ;;
|
|
esac
|
|
|
|
post_extract() {
|
|
# causes build fail in vsce-sign when doing npm ci
|
|
# unnecessary for standalone packaging
|
|
rm -r packages/vscode-pyright
|
|
# test references vscode-pyright files
|
|
rm packages/pyright-internal/src/tests/diagnosticOverrides.test.ts
|
|
}
|
|
|
|
do_configure() {
|
|
cd "$wrksrc"
|
|
export npm_config_arch="${XBPS_TARGET_MACHINE%-musl}"
|
|
npm ci
|
|
}
|
|
|
|
do_build() {
|
|
npm run build
|
|
}
|
|
|
|
do_check() {
|
|
cd ../pyright-internal
|
|
npm test
|
|
}
|
|
|
|
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"
|
|
}
|