blob: b34d5833fb74e36ab3523e56c0cf36701312765b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Copyright 2022-2024 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 ./npm-cache install $(portageq envvar DISTDIR)/${P}.tgz
# tar -caf ${P}-deps.tar.xz npm-cache
LICENSE="BSD-2 ISC MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND=">=net-libs/nodejs-18.19.30"
BDEPEND=">=net-libs/nodejs-18.19.30[npm]"
src_unpack() {
cd "${T}" || die "Could not cd to temporary directory"
unpack ${P}-deps.tar.xz
}
src_install() {
npm \
--offline \
--verbose \
--progress false \
--foreground-scripts \
--global \
--prefix "${ED}"/usr \
--cache "${T}"/npm-cache \
install "${DISTDIR}"/${P}.tgz || die "npm install failed"
cd "${ED}"/usr/$(get_libdir)/node_modules/${PN} || die "cd failed"
einstalldocs
}
pkg_postinst() {
optfeature "linting support" dev-util/shellcheck dev-util/shellcheck-bin
}
|