void-packages/srcpkgs/bash-language-server/template

35 lines
855 B
Bash
Raw Normal View History

# Template file for 'bash-language-server'
pkgname=bash-language-server
2023-07-18 21:29:17 +02:00
version=5.0.0
revision=1
2023-07-18 21:29:17 +02:00
hostmakedepends="pnpm"
depends="nodejs"
short_desc="Bash language server"
maintainer="sirkhancision <jsantiago12tone@gmail.com>"
license="MIT"
homepage="https://github.com/bash-lsp/bash-language-server"
distfiles="https://github.com/bash-lsp/bash-language-server/archive/refs/tags/server-${version}.tar.gz"
2023-07-18 21:29:17 +02:00
checksum=ef8d104591cfcddf85da14af9585d8f0ab97f12e158df67ab50900f7342e353a
do_build() {
2023-07-18 21:29:17 +02:00
pnpm install --frozen-lockfile
pnpm run compile
}
do_install() {
TARGET_PATH="usr/lib/${pkgname}"
cd server
2023-07-18 21:29:17 +02:00
rm -r node_modules
npm install --production
vmkdir ${TARGET_PATH}
vcopy * ${TARGET_PATH}
vmkdir usr/bin
ln -sf /${TARGET_PATH}/out/cli.js ${DESTDIR}/usr/bin/${pkgname}
chmod 0755 ${DESTDIR}/${TARGET_PATH}/out/cli.js
vlicense ../LICENSE
}