From 5226a8f783f2c07b158181ef1d227a9c240c673e Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Mon, 6 Dec 2021 10:38:47 +0100 Subject: [PATCH] upgpkg: nodejs-csso 5.0.0-2 add LICENSE --- nodejs-csso/.SRCINFO | 2 +- nodejs-csso/PKGBUILD | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/nodejs-csso/.SRCINFO b/nodejs-csso/.SRCINFO index c27054c..f1be648 100644 --- a/nodejs-csso/.SRCINFO +++ b/nodejs-csso/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = nodejs-csso pkgdesc = CSS minifier with structural optimisations pkgver = 5.0.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/css/csso arch = any license = MIT diff --git a/nodejs-csso/PKGBUILD b/nodejs-csso/PKGBUILD index 295c649..4cab15b 100644 --- a/nodejs-csso/PKGBUILD +++ b/nodejs-csso/PKGBUILD @@ -1,25 +1,29 @@ # Maintainer: Cedric Girard pkgname=nodejs-csso +_npmname=csso pkgver=5.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="CSS minifier with structural optimisations" arch=('any') url="https://github.com/css/csso" license=('MIT') depends=('nodejs') makedepends=('npm') -source=("https://registry.npmjs.org/csso/-/csso-$pkgver.tgz") +source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz") sha256sums=('5786f51f021300198086494a2a04aa4baf6126f0d39d3a749c28f293655fb893') package() { - npm install -g --prefix "$pkgdir"/usr "$srcdir"/csso-$pkgver.tgz + npm install -g --prefix "$pkgdir"/usr "$srcdir"/$_npmname-$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" + # 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" + # npm installs package.json owned by build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "$pkgdir" + + install -Dm0644 "$pkgdir/usr/lib/node_modules/$_npmname/LICENSE" \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }