summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBjörn Bidar2021-11-20 00:06:45 +0200
committerBjörn Bidar2021-11-20 00:06:45 +0200
commitce7397bde4e55f02725b601803c4382a780e4939 (patch)
tree2718655e4cf68a771124e56db81f650738daaf1a /PKGBUILD
parent4fdea218a655a862564f21386b3e71ad432d1c75 (diff)
downloadaur-ce7397bde4e55f02725b601803c4382a780e4939.tar.gz
Update to 1.0.5-2
- Fix packaging issues by following the Arch Node.js package guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 15 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index af8626652eb9..bed50f2b3dd5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,29 @@
# Maintainer: Bjoern Bidar <theodorstormgrade@gmail.com>
pkgname=csslint
pkgver=1.0.5
-pkgrel=1
+pkgrel=2
pkgdesc="Automated linting of Cascading Stylesheets"
arch=('any')
url="https://github.com/stubbornella/csslint"
license=('GPL')
depends=('nodejs')
-makedepends=('npm')
+makedepends=('npm' 'jq')
conflicts=('csslint-git')
+source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
+md5sums=('86ac2064a6d01761d3be20f730ab58d9')
+noextract=("${pkgname}-${pkgver}.tgz")
-pkgver()
-{
- npm view $pkgname version
-}
package() {
- npm install $pkgname -g --prefix ${pkgdir}/usr
- rmdir ${pkgdir}/usr/etc
+ npm install -g --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
+
+
+ local tmppackage="$(mktemp)"
+ local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
+ jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
+ mv "$tmppackage" "$pkgjson"
+ chmod 644 "$pkgjson"
+
+
chown -R root:root ${pkgdir}/usr
}