New package: pnpm-6.0.1

This commit is contained in:
reback00 2021-04-12 10:06:53 +06:00 committed by Piotr
parent c31203b56e
commit 4facdb0261
1 changed files with 30 additions and 0 deletions

30
srcpkgs/pnpm/template Normal file
View File

@ -0,0 +1,30 @@
# Template file for 'pnpm'
pkgname=pnpm
version=6.0.1
revision=1
build_style=fetch
hostmakedepends="nodejs jq"
depends="nodejs"
short_desc="Fast, disk space efficient package manager"
maintainer="reback00 <reback00@protonmail.com>"
license="MIT"
homepage="https://pnpm.js.org/"
distfiles="https://registry.npmjs.org/${pkgname}/-/${pkgname}-${version}.tgz"
checksum=6e390217ab6250f85d28cb0135620e3b0526a849dda7fb7c54f092c1b6bd465c
python_version=3
do_install() {
npm install -g --user root --prefix "${DESTDIR}/usr" "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-${version}.tgz"
local _npmdir="${DESTDIR}/usr/lib/node_modules/${pkgname}"
# Sort and cleanup package.json
jq '.|=with_entries(select(.key|test("_.+")|not))' "$_npmdir/package.json" > "$_npmdir/package.json"
chmod 644 "$_npmdir/package.json"
# Delete JS SourceMaps
find "${DESTDIR}/usr/lib" -depth -name '*.map' -delete
vlicense "$_npmdir/LICENSE"
vdoc "$_npmdir/README.md"
rm -rf "${DESTDIR}/usr/etc" "$_npmdir/LICENSE" "$_npmdir/README.md"
}