diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .nvchecker.toml | 3 | ||||
-rw-r--r-- | PKGBUILD | 7 |
4 files changed, 10 insertions, 8 deletions
@@ -1,11 +1,13 @@ pkgbase = nodejs-jsonlint pkgdesc = Validate JSON pkgver = 1.6.3 - pkgrel = 4 + pkgrel = 5 url = https://zaa.ch/jsonlint}/ arch = any license = MIT makedepends = npm + makedepends = jq + makedepends = moreutils depends = nodejs noextract = jsonlint-1.6.3.tgz source = https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.3.tgz diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0ca50ff4dd97..000000000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!./.SRCINFO -!./.gitignore -!./PKGBUILD diff --git a/.nvchecker.toml b/.nvchecker.toml new file mode 100644 index 000000000000..0bedee3c1b9e --- /dev/null +++ b/.nvchecker.toml @@ -0,0 +1,3 @@ +[nodejs-jsonlint] +source = "npm" +npm = "jsonlint" @@ -5,13 +5,13 @@ _npmname=jsonlint pkgname=nodejs-"$_npmname" pkgver=1.6.3 -pkgrel=4 +pkgrel=5 pkgdesc='Validate JSON' arch=('any') url="https://zaa.ch/$_npmname}/" license=('MIT') depends=('nodejs') -makedepends=('npm') +makedepends=('npm' 'jq' 'moreutils') source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz") sha256sums=('987f42f0754b7bc0c84967b81fc2b4db0ed2ebe2117ccc5a5faa59e462447723') noextract=("${source[@]##*/}") @@ -19,6 +19,7 @@ noextract=("${source[@]##*/}") package() { npm install -g --user root --cache "$srcdir/npm-cache" --prefix "$pkgdir/usr" "${source[@]##*/}" find "$pkgdir"/usr -type d -exec chmod 755 {} + - find "$pkgdir" -type f -name package.json -exec sed -i -e "/${pkgdir//\//\\/}/d" -e "/${srcdir//\//\\/}/d" {} \; + find "$pkgdir" -type f -name package.json \ + -execdir sh -c "jq '. |= with_entries(select(.key | test(\"_.+\") | not))' {} | sponge {}" \; chown -R root:root "$pkgdir" } |