upgpkg: nodejs-less 4.1.1-2

remove --user root for npm
This commit is contained in:
Cedric Girard 2021-05-15 18:08:51 +02:00
parent 6ec84f3488
commit 500fd08785
Signed by: X-dark
GPG Key ID: E7D0E125DB9519E4
2 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
pkgbase = nodejs-less
pkgdesc = A standalone compiler for the LESS CSS language.
pkgver = 4.1.1
pkgrel = 1
pkgrel = 2
url = http://lesscss.org/
arch = any
license = Apache

View File

@ -3,7 +3,7 @@
pkgname=nodejs-less
pkgver=4.1.1
pkgrel=1
pkgrel=2
pkgdesc="A standalone compiler for the LESS CSS language."
arch=('any')
url="http://lesscss.org/"
@ -17,7 +17,14 @@ source=("https://registry.npmjs.org/less/-/less-$pkgver.tgz")
sha256sums=('1b3b222f91dc2540712e096668b20aaec352c8107009e63d1c2726bc8a6ceff0')
package() {
npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/less-$pkgver.tgz
chmod -R go-w "$pkgdir"/usr
chown -R root:root "$pkgdir"/usr
npm install -g --prefix "$pkgdir"/usr "$srcdir"/less-$pkgver.tgz
# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/npm/issues/9359 for details.
chmod -R u=rwX,go=rX "$pkgdir"
# npm installs package.json owned by build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "$pkgdir"
}