summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-02-19 08:39:59 +0300
committerCaleb Maclennan2020-02-19 08:39:59 +0300
commit7213d33ac47c3e303a4baa6960db7853a2bfaadd (patch)
treeeee6e9c34c13f9d53a0f43dc852ac4578eb7e380
parent6e752a2e1e7b2b5148681ac97560bccebea20a9b (diff)
downloadaur-7213d33ac47c3e303a4baa6960db7853a2bfaadd.tar.gz
Fix recursive srcdir path removal
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
2 files changed, 10 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1375869fef2a..af174df7efd8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,13 @@
pkgbase = nodejs-pandiff
pkgdesc = Prose diffs for any document format supported by Pandoc
pkgver = 0.5.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/davidar/pandiff
arch = any
license = MIT
makedepends = npm
+ makedepends = jq
+ makedepends = moreutils
depends = nodejs
depends = pandoc
noextract = pandiff-0.5.0.tgz
diff --git a/PKGBUILD b/PKGBUILD
index 866c503b35a8..7b7f29712528 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,21 @@
_npmname=pandiff
pkgname=nodejs-"$_npmname"
pkgver=0.5.0
-pkgrel=2
+pkgrel=3
pkgdesc='Prose diffs for any document format supported by Pandoc'
arch=('any')
url="https://github.com/davidar/$_npmname"
license=('MIT')
depends=('nodejs' 'pandoc')
-makedepends=('npm')
+makedepends=('npm' 'jq' 'moreutils')
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
noextract=("${source[@]##*/}")
sha256sums=('2ca38a951203aabdea1b198289e531562c7ee5ca00eda9e42012a4bf10a4978c')
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" {} \;
- chown -R root:root "$pkgdir"
+ 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 \
+ -execdir sh -c "jq '. |= with_entries(select(.key | test(\"_.+\") | not))' {} | sponge {}" \;
+ chown -R root:root "$pkgdir"
}
-
-# vim:set ts=2 sw=2 et: