summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-02-10 18:01:42 +0300
committerCaleb Maclennan2020-02-10 18:01:42 +0300
commitaf0c417a63b24081e86991d79bf61513e46ad845 (patch)
tree598e86e78341e364ae8f796bd5a9c6963d4685b4
parent7baff97df2e251a2b695313b262330bab70e2182 (diff)
downloadaur-af0c417a63b24081e86991d79bf61513e46ad845.tar.gz
Fix NPM packaging shenanigans
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
2 files changed, 11 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a6b058ab207..1375869fef2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,12 @@
pkgbase = nodejs-pandiff
pkgdesc = Prose diffs for any document format supported by Pandoc
pkgver = 0.5.0
- pkgrel = 1
- url = https://github.com/davidar/pandiff#readme
+ pkgrel = 2
+ url = https://github.com/davidar/pandiff
arch = any
license = MIT
+ makedepends = npm
depends = nodejs
- depends = npm
depends = pandoc
noextract = pandiff-0.5.0.tgz
source = https://registry.npmjs.org/pandiff/-/pandiff-0.5.0.tgz
diff --git a/PKGBUILD b/PKGBUILD
index 6f40faf6ece0..466e8df358a5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,19 +3,22 @@
_npmname=pandiff
pkgname=nodejs-"$_npmname"
pkgver=0.5.0
-pkgrel=1
+pkgrel=2
pkgdesc='Prose diffs for any document format supported by Pandoc'
arch=('any')
-url="https://github.com/davidar/pandiff#readme"
+url="https://github.com/davidar/$_npmname"
license=('MIT')
-depends=('nodejs' 'npm' 'pandoc')
-optdepends=()
+depends=('nodejs' 'pandoc')
+makedepends=('npm')
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
noextract=("${source[@]##*/}")
sha256sums=('2ca38a951203aabdea1b198289e531562c7ee5ca00eda9e42012a4bf10a4978c')
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
}
# vim:set ts=2 sw=2 et: