archrelease: copy trunk to community-any
[ArchLinux/community.git] / nodejs-source-map / trunk / PKGBUILD
blob6873b45c8c6414b4e5805fde98f3dca5362af6ca
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _npmname=source-map
4 pkgname=nodejs-$_npmname
5 pkgver=0.7.4
6 pkgrel=1
7 pkgdesc="Library to generate and consume the source map format"
8 arch=('any')
9 url="https://github.com/mozilla/source-map"
10 license=('BSD')
11 depends=('nodejs')
12 makedepends=('npm')
13 source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
14 noextract=($_npmname-$pkgver.tgz)
15 sha256sums=('65dea7e28963ef0ade5a47a6921d34782f9fb35863045ef8604ec90673947d3d')
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/source-map/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE