blob: 5bc8a9fc3f22a9940d276c643b657ed9088ef0a7 (
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
|
# Maintainer: Tomasz Jakub Rup <tomasz.rup@gmail.com>
pkgname=pnpm
pkgver=4.1.8
pkgrel=2
pkgdesc="Fast, disk space efficient package manager"
arch=('any')
url="https://pnpm.js.org/"
license=('MIT')
depends=('nodejs>=10.0.0')
makedepends=('npm' 'jq')
source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
noextract=("$pkgname-$pkgver.tgz")
md5sums=('5b8ce6d55e91797f1ece98a7defea3e9')
package() {
npm install -g --user root --prefix "$pkgdir"/usr "$srcdir/$pkgname-$pkgver.tgz"
local _npmdir="$pkgdir/usr/lib/node_modules/$pkgname"
find "$pkgdir"/usr -type d -exec chmod 755 {} +
chown -R root:root "$pkgdir"
find "$pkgdir"/usr/lib -depth -name '*.map' -delete
install -Dm644 "$_npmdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$_npmdir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
rm -rf "$pkgdir/usr/etc" "$_npmdir/LICENSE" "$_npmdir/README.md"
local tmppackage="$(mktemp)"
jq '.|=with_entries(select(.key|test("_.+")|not))' "$_npmdir/package.json" > "$tmppackage"
mv "$tmppackage" "$_npmdir/package.json"
chmod 644 "$_npmdir/package.json"
}
|