1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgname=nodejs-$_npmname
7 pkgdesc="Node/npm Option Parsing library"
9 url="https://github.com/npm/nopt"
10 license=('custom:ISC')
13 source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
14 noextract=($_npmname-$pkgver.tgz)
15 sha256sums=('1609b8c458c75ef3997ae6d143f9e6fcb6323a35769c40692e1f2be8fe488f90')
19 npm install -g --prefix "$pkgdir"/usr "$srcdir"/$_npmname-$pkgver.tgz
21 # Non-deterministic race in npm gives 777 permissions to random directories.
22 # See https://github.com/npm/npm/issues/9359 for details.
23 chmod -R u=rwX,go=rX "$pkgdir"
25 # npm installs package.json owned by build user
26 # https://bugs.archlinux.org/task/63396
27 chown -R root:root "$pkgdir"
29 install -d "$pkgdir"/usr/share/licenses/$pkgname
30 ln -s ../../../lib/node_modules/$_npmname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE