From 2362436b5dc38be2cdf06c826cec87f297653b9b Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 30 Aug 2022 05:48:23 +0200 Subject: [PATCH] dev-util/bash-language-server: new package, add 3.1.0 Signed-off-by: tastytea --- dev-util/bash-language-server/Manifest | 2 + .../bash-language-server-3.1.0.ebuild | 51 +++++++++++++++++++ dev-util/bash-language-server/metadata.xml | 8 +++ 3 files changed, 61 insertions(+) create mode 100644 dev-util/bash-language-server/Manifest create mode 100644 dev-util/bash-language-server/bash-language-server-3.1.0.ebuild create mode 100644 dev-util/bash-language-server/metadata.xml diff --git a/dev-util/bash-language-server/Manifest b/dev-util/bash-language-server/Manifest new file mode 100644 index 000000000..fcbe26bd4 --- /dev/null +++ b/dev-util/bash-language-server/Manifest @@ -0,0 +1,2 @@ +DIST bash-language-server-3.1.0-deps.tar.xz 3304768 BLAKE2B daf65f274b96f7e53dedb2fe2c4152d73cf4f78e00ecab516657f1e18265807a430a71d8c8dd4b9be1f0bbad3318977a7ecddce65247d2fae926948f089adc00 SHA512 4a083882aea9c203d887af6f0d4f7912a0bf0706364c72665013a8833d780add18e9cecbb06100a739215ee689c681558fd6bfd282838c6c8cbdc9fd2b28eb28 +DIST bash-language-server-3.1.0.tgz 140577 BLAKE2B df87268f0e2b381e637396eee6ad0462b6a39ce83bfbd04adc936d06dad1a4769fc840f7aff4b8f6146d790a39383dcef8c040858217d3b5ceece22dd1bd2a37 SHA512 0da4e5643eb44b7665740921721e681f5bf1527f23a1e170ef720e9f03309994a56d072d683ae73fb0dd0cf455aeb437ba151095a68e18f7890ac63f6be57aa6 diff --git a/dev-util/bash-language-server/bash-language-server-3.1.0.ebuild b/dev-util/bash-language-server/bash-language-server-3.1.0.ebuild new file mode 100644 index 000000000..02dc81b4b --- /dev/null +++ b/dev-util/bash-language-server/bash-language-server-3.1.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit optfeature + +DESCRIPTION="A language server for Bash" +HOMEPAGE="https://github.com/bash-lsp/bash-language-server" +SRC_URI=" + mirror://npm/${PN}/-/${P}.tgz + https://tastytea.de/files/gentoo/${P}-deps.tar.xz +" +S="${WORKDIR}" + +# NOTE: to generate the dependency tarball: +# npm --cache "$(realpath ./npm-cache)" install $(portageq envvar DISTDIR)/${P}.tgz +# tar -caf ${P}-deps.tar.xz npm-cache + +LICENSE="Apache-2.0 BSD-2 BSD ISC MIT public-domain" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="net-libs/nodejs[npm]" +RDEPEND="${DEPEND}" +BDEPEND="${DEPEND}" + +src_unpack() { + unpack ${P}-deps.tar.xz + mv npm-cache "${T}"/ || die "Could not move npm cache" +} +src_compile() { + npm --offline --verbose --cache "${T}"/npm-cache \ + install "${DISTDIR}"/${P}.tgz \ + || die "Compilation failed" +} + +src_install() { + insinto opt/${PN} + doins -r node_modules + + local path=/opt/${PN}/node_modules/${PN}/bin/main.js + chmod +x "${ED}"/${path} || die + dosym -r ${path} /usr/bin/${PN} + + einstalldocs +} + +pkg_postinst() { + optfeature "linting support" dev-util/shellcheck dev-util/shellcheck-bin +} diff --git a/dev-util/bash-language-server/metadata.xml b/dev-util/bash-language-server/metadata.xml new file mode 100644 index 000000000..5533c93d7 --- /dev/null +++ b/dev-util/bash-language-server/metadata.xml @@ -0,0 +1,8 @@ + + + + + gentoo@tastytea.de + Ronny (tastytea) Gutbrod + +