1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Daniel Nagy <danielnagy at gmx de>
7 pkgdesc="JavaScript parser, mangler/compressor and beautifier toolkit"
9 url='http://lisperator.net/uglifyjs'
13 install=${pkgname}.install
14 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
15 noextract=($pkgname-$pkgver.tgz)
16 sha512sums=('4fdabcd93248f5efc2d5303162f7dbd7ac4ed76d2d315159ac60377fdfcfe38db80cdbbaca92b5d37cb418f1556b5ef2a2dc12c995b98985e08d81e41ab256fe')
19 npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
20 mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
21 ln -s "../../../lib/node_modules/uglify-js/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
23 # Non-deterministic race in npm gives 777 permissions to random directories.
24 # See https://github.com/npm/npm/issues/9359 for details.
25 chmod -R u=rwX,go=rX "$pkgdir"
27 # npm installs package.json owned by build user
28 # https://bugs.archlinux.org/task/63396
29 chown -R root:root "$pkgdir"
32 # vim:set ts=2 sw=2 et: