summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD9
2 files changed, 7 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1b48fcc9e36..c408fe2e9d3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,10 @@
pkgbase = nodejs-jsonlint
pkgdesc = Validate JSON
pkgver = 1.6.3
- pkgrel = 3
+ pkgrel = 4
url = https://zaa.ch/jsonlint}/
arch = any
license = MIT
- makedepends = nodejs
makedepends = npm
depends = nodejs
noextract = jsonlint-1.6.3.tgz
diff --git a/PKGBUILD b/PKGBUILD
index 3decabc81b8..e5e56d0085e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,17 +5,20 @@
_npmname=jsonlint
pkgname=nodejs-"$_npmname"
pkgver=1.6.3
-pkgrel=3
+pkgrel=4
pkgdesc='Validate JSON'
arch=('any')
url="https://zaa.ch/$_npmname}/"
license=('MIT')
depends=('nodejs')
-makedepends=('nodejs' 'npm')
+makedepends=('npm')
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
sha256sums=('987f42f0754b7bc0c84967b81fc2b4db0ed2ebe2117ccc5a5faa59e462447723')
noextract=("${source[@]##*/}")
package() {
- npm install -g --prefix "$pkgdir/usr" "${source[@]##*/}"
+ 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" {} \;
+ chown -R root:root $pkgdir
}