upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / nodejs-nopt / trunk / PKGBUILD
blob869f0efcda64569aefaa195104243d07e345ba71
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _npmname=nopt
4 pkgname=nodejs-$_npmname
5 pkgver=7.1.0
6 pkgrel=1
7 pkgdesc="Node/npm Option Parsing library"
8 arch=('any')
9 url="https://github.com/npm/nopt"
10 license=('custom:ISC')
11 depends=('nodejs')
12 makedepends=('npm')
13 source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
14 noextract=($_npmname-$pkgver.tgz)
15 sha256sums=('1609b8c458c75ef3997ae6d143f9e6fcb6323a35769c40692e1f2be8fe488f90')
16 options=("!strip")
18 package() {
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