blob: a06ed104ae1280b51fb3b93a0a80de00cec486bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
_npmname=pandiff
pkgname=nodejs-"$_npmname"
pkgver=0.8.0
pkgrel=1
pkgdesc='Prose diffs for any document format supported by Pandoc'
arch=(any)
url="https://github.com/davidar/$_npmname"
license=(MIT)
depends=(nodejs
pandoc)
makedepends=(jq
moreutils
npm)
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
noextract=("${source[@]##*/}")
sha256sums=('a2721f94607580d27f01667f8c9ff8c24c43cdbf930ac2cae101ce95261ba93b')
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 \
-execdir sh -c "jq '. |= with_entries(select(.key | test(\"_.+\") | not))' {} | sponge {}" \;
chown -R root:root "$pkgdir"
}
|