archlinux-pkgbuilds/nodejs-csso/PKGBUILD

26 lines
801 B
Text
Raw Permalink Normal View History

2021-01-02 15:19:44 +01:00
# Maintainer: Cedric Girard <cgirard [dot] archlinux [at] valinor [dot] fr>
pkgname=nodejs-csso
_npmname=csso
pkgver=5.0.5
pkgrel=1
2021-01-02 15:19:44 +01:00
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/$_npmname/-/$_npmname-$pkgver.tgz")
sha256sums=('f7605918aff2de20dd00b741edbc888f0f8ec0f79c060745c987a1ef50e54fd8')
2021-01-02 15:19:44 +01:00
package() {
npm install -g --prefix "$pkgdir"/usr --cache "${srcdir}/npm-cache" "$srcdir"/$_npmname-$pkgver.tgz
# 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"
2021-01-02 15:19:44 +01:00
}