1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
6 pkgdesc='The semantic version parser used by npm'
8 url='https://github.com/npm/node-semver'
12 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
13 noextract=($pkgname-$pkgver.tgz)
14 sha512sums=('341d5cb462f9ae51eb3c9b450d5215cd3c90ca530bbbd37d548080e87485268f0c086553316ea07e989cc0a9a62bf7408d33abaaee65eb72493a90d2ac08acdc')
17 npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
19 # Non-deterministic race in npm gives 777 permissions to random directories.
20 # See https://github.com/npm/npm/issues/9359 for details.
21 chmod -R u=rwX,go=rX "$pkgdir"
23 # npm installs package.json owned by build user
24 # https://bugs.archlinux.org/task/63396
25 chown -R root:root "$pkgdir"
27 install -d "$pkgdir"/usr/share/licenses/$pkgname
28 ln -s ../../../lib/node_modules/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE