commit: 41c5c725155309c142d6a2200e19f926d22e1ef7
parent 3743c91afa982b569195ae80179116439578f2d7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 14 Aug 2022 10:22:47 +0200
dev-nodejs/which: new package, add 2.0.2
Diffstat:
2 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/dev-nodejs/which/Manifest b/dev-nodejs/which/Manifest
@@ -0,0 +1 @@
+DIST which-2.0.2.tar.gz 35404 BLAKE2B 2e1b156ceae27e9b4e3bc5ae3c27c59e06a699ee82fb5aabdf581a23941a19d0d3345ddd9a2235874226ad6eedba87d00a1000fd970d314e3e4a8550718cc1d6 SHA512 69ea43103fffaf1e732bb8214a9d7d36e32a60b6af4be85e02231350bc028ab3a0a8a410e61b191e98363a8dffc9d1772c605d814bee050659a77b3347659bd6
diff --git a/dev-nodejs/which/which-2.0.2.ebuild b/dev-nodejs/which/which-2.0.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit nodejs
+
+DESCRIPTION="Like which(1) unix command. Find the first instance of an executable in the PATH."
+HOMEPAGE="https://github.com/isaacs/node-which"
+SRC_URI="https://github.com/isaacs/node-which/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/node-which-${PV}"
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+#IUSE="test"
+
+RDEPEND="dev-nodejs/isexe"
+DEPEND="${RDEPEND}"
+#test? (
+# dev-nodejs/mkdirp
+# dev-nodejs/rimraf
+# dev-nodejs/tap
+#)"
+#RESTRICT="!test? ( test )"
+
+RESTRICT="test"
+
+src_install() {
+ insinto "${NODEJS_SITELIB}${PN}"
+ doins package.json
+
+ cat package.json | jq -r .files[] | while read pkg
+ do
+ insinto "${NODEJS_SITELIB}${PN}/$(dirname "$pkg")"
+ doins -r "$pkg"
+ done
+
+ fperms 755 "${NODEJS_SITELIB}${PN}/bin/node-which"
+ dosym "${NODEJS_SITELIB}${PN}/bin/node-which" "${EPREFIX}/usr/bin/node-which"
+}