From a5274af1deb43fdca08afaffc7be740f66692d7c Mon Sep 17 00:00:00 2001 From: sirkhancision Date: Fri, 17 Mar 2023 04:28:47 -0300 Subject: [PATCH] New package: bash-language-server-4.9.1 --- srcpkgs/bash-language-server/template | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/bash-language-server/template diff --git a/srcpkgs/bash-language-server/template b/srcpkgs/bash-language-server/template new file mode 100644 index 00000000000..5c8f99cdd42 --- /dev/null +++ b/srcpkgs/bash-language-server/template @@ -0,0 +1,36 @@ +# Template file for 'bash-language-server' +pkgname=bash-language-server +version=4.9.1 +revision=1 +hostmakedepends="jq yarn" +depends="nodejs" +short_desc="Bash language server" +maintainer="sirkhancision " +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=eef93c1167394fb01fc300c5b8c326fd9362dd3118a1e075549342e24e9d6e5c + +do_build() { + yarn + 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 +}