upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / uglify-js / repos / community-any / PKGBUILD
blob726f0534aefcb4cc4227eac1dd0f6da152684f2a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Daniel Nagy <danielnagy at gmx de>
4 pkgname=uglify-js
5 pkgver=3.17.4
6 pkgrel=1
7 pkgdesc="JavaScript parser, mangler/compressor and beautifier toolkit"
8 arch=('any')
9 url='http://lisperator.net/uglifyjs'
10 license=('BSD')
11 depends=('nodejs')
12 makedepends=('npm')
13 install=${pkgname}.install
14 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
15 noextract=($pkgname-$pkgver.tgz)
16 sha512sums=('4fdabcd93248f5efc2d5303162f7dbd7ac4ed76d2d315159ac60377fdfcfe38db80cdbbaca92b5d37cb418f1556b5ef2a2dc12c995b98985e08d81e41ab256fe')
18 package() {
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: