upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / node-gyp / trunk / PKGBUILD
blob2fe0e5eea1aed6f1057177ebea8cea371be2cf34
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
4 pkgname=node-gyp
5 pkgver=9.3.1
6 pkgrel=1
7 pkgdesc='Node.js native addon build tool'
8 arch=('any')
9 url='https://github.com/nodejs/node-gyp'
10 license=('MIT')
11 depends=('nodejs' 'nodejs-nopt' 'python' 'semver')
12 makedepends=('npm')
13 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
14 noextract=($pkgname-$pkgver.tgz)
15 sha512sums=('e10d7a642aaade0f1ac24e94a654fb02ec50df95cde11ff27fffb0480c1c05402383b979f114da72d59a3fc7c80d38b417323b61c54bba3c04c5a91995f5a45e')
17 package() {
18   npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
20   # Non-deterministic race in npm gives 777 permissions to random directories.
21   # See https://github.com/npm/npm/issues/9359 for details.
22   chmod -R u=rwX,go=rX "$pkgdir"
24   # npm installs package.json owned by build user
25   # https://bugs.archlinux.org/task/63396
26   chown -R root:root "$pkgdir"
28   # Experimental dedup
29   rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/{,.bin/}nopt
30   rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/{,.bin/}semver
32   install -d "$pkgdir"/usr/share/licenses/$pkgname
33   ln -s ../../../lib/node_modules/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE