archlinux-pkgbuilds/nodejs-less/PKGBUILD
2021-05-15 18:08:51 +02:00

30 lines
947 B
Bash

# Maintainer: Cedric Girard <cgirard [dot] archlinux [at] valinor [dot] fr>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com
pkgname=nodejs-less
pkgver=4.1.1
pkgrel=2
pkgdesc="A standalone compiler for the LESS CSS language."
arch=('any')
url="http://lesscss.org/"
license=('Apache')
depends=('nodejs')
makedepends=('npm')
conflicts=('lessc')
provides=("lessc=$pkgver")
replaces=('lessc')
source=("https://registry.npmjs.org/less/-/less-$pkgver.tgz")
sha256sums=('1b3b222f91dc2540712e096668b20aaec352c8107009e63d1c2726bc8a6ceff0')
package() {
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"
}