dev-util/bash-language-server: new package, add 3.1.0

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2022-08-30 05:48:23 +02:00
parent 97c518cf32
commit 2362436b5d
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
3 changed files with 61 additions and 0 deletions

View File

@ -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

View File

@ -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
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gentoo@tastytea.de</email>
<name>Ronny (tastytea) Gutbrod</name>
</maintainer>
</pkgmetadata>