37 lines
987 B
Bash
37 lines
987 B
Bash
# Template file for 'bash-language-server'
|
|
pkgname=bash-language-server
|
|
version=4.9.2
|
|
revision=1
|
|
hostmakedepends="jq yarn"
|
|
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"
|
|
checksum=7d162baf072ba8807f4253d7fdbe7210507e5b0106e94cc0373668dd40a25fee
|
|
|
|
do_build() {
|
|
yarn install
|
|
yarn run compile
|
|
}
|
|
|
|
do_install() {
|
|
TARGET_PATH="usr/lib/${pkgname}"
|
|
cd server
|
|
|
|
cp package.json{,.bak}
|
|
read -ra _devDependencies < <(jq -r '.devDependencies | keys | join(" ")' package.json)
|
|
yarn remove --frozen-lockfile "${_devDependencies[@]}"
|
|
mv package.json{.bak,}
|
|
|
|
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
|
|
}
|