Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions srcpkgs/yaml-language-server/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Template file for 'yaml-language-server'
pkgname=yaml-language-server
version=1.21.0
revision=1
hostmakedepends="nodejs"
depends="nodejs"
short_desc="Language server for YAML files"
maintainer="Alex March <alex@hosaka.cc>"
license="MIT"
homepage="https://github.com/redhat-developer/yaml-language-server"
changelog="https://raw.githubusercontent.com/redhat-developer/${pkgname}/refs/heads/main/CHANGELOG.md"
distfiles="https://github.com/redhat-developer/${pkgname}/archive/refs/tags/${version}.tar.gz"
checksum=9a1e16e508d29ab74113b34fa8957b61de81d79ec6c1b7be943c1749e1ac5038

do_configure() {
npm ci
}

do_build() {
# UMD (Universal Module Definition) modules and ES Modules (ESM) are not
# necessary, compiling to CommonJS is enough to have a working server
npm run compile
}

do_check() {
npm test
}

do_install() {
TARGET_PATH="usr/lib/${pkgname}"

rm -r node_modules
npm install --omit=dev --ignore-scripts

vmkdir ${TARGET_PATH}
vcopy bin ${TARGET_PATH}
vcopy l10n ${TARGET_PATH}
vcopy node_modules ${TARGET_PATH}
vcopy out ${TARGET_PATH}
vcopy package.json ${TARGET_PATH}

vmkdir usr/bin
ln -sf /${TARGET_PATH}/bin/${pkgname} ${DESTDIR}/usr/bin/${pkgname}

vlicense LICENSE
}
Loading