-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathtemplate
More file actions
46 lines (38 loc) · 1.18 KB
/
template
File metadata and controls
46 lines (38 loc) · 1.18 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
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
}