sys-apps/pnpm: new package, add 8.6.2

Signed-off-by: ston <ston.jia@qq.com>
This commit is contained in:
ston 2023-06-15 21:04:58 +08:00 committed by 梁永祥
parent 0f721ceb4f
commit f2f2a5dccf
3 changed files with 50 additions and 0 deletions

1
sys-apps/pnpm/Manifest Normal file
View File

@ -0,0 +1 @@
DIST pnpm-8.6.2.tar.xz 2167360 BLAKE2B 9db29aa4c6d9cd399907b49de6d52e40f84b1e5900a19046a3706de52d771e9acb24f4841de597149001589ff9239f3cdac06ccd870c5151cc171e42df217d03 SHA512 8abdd9b874f2d53796e2f9fa4845747695572c54575a323f37219484512b7d85c06fe54813bbdc3c67a4645b996a8629d6d537c3264122774e59ef122845a291

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>ston</name>
<email>ston.jia@qq.com</email>
</maintainer>
<upstream>
<remote-id type="github">pnpm/pnpm</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,38 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Fast, disk space efficient package manager"
HOMEPAGE="https://pnpm.io"
# Use the following command to create this package
# npm install -g \
# --cache "${PWD}/npm-cache" \
# --prefix "${PWD}/pkgdir" \
# pnpm@${PN}
SRC_URI="https://github.com/st0nie/gentoo-go-deps/releases/download/${P}/${P}-pkg.tar.xz -> ${P}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="net-libs/nodejs"
RDEPEND="${DEPEND}"
BDEPEND="app-misc/jq"
S="${WORKDIR}/pkgdir"
src_install(){
mkdir "${D}/usr" || die
cp -r * "${D}/usr" || die
fowners -R root:root /usr
find "${D}/usr/lib64" -depth -name "*.map" -delete || die
local _tmp_package="$(mktemp || die)"
local _npmdir=/usr/lib64/node_modules/${PN}
jq '.|=with_entries(select(.key|test("_.+")|not))' "${D}/$_npmdir/package.json" > "$_tmp_package" || die
insinto $_npmdir
newins $_tmp_package package.json
fperms 644 $_npmdir/package.json
}