diff options
author | Brad Erhart | 2019-05-13 12:19:02 -0700 |
---|---|---|
committer | Brad Erhart | 2019-05-13 12:19:02 -0700 |
commit | a8ede5004932b49f894217d10d94f18e9434e70d (patch) | |
tree | aaa5c59f6f4fc0403ab79a968ab0ed6c87fbc18e | |
parent | 5680c34c1acb452bdf466dde38dec4929398163e (diff) | |
download | aur-a8ede5004932b49f894217d10d94f18e9434e70d.tar.gz |
Improve zapier-platform-cli v8.1.0
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 20 |
2 files changed, 20 insertions, 5 deletions
@@ -1,11 +1,12 @@ pkgbase = zapier-platform-cli pkgdesc = This CLI is your gateway to creating custom applications on the Zapier platform pkgver = 8.1.0 - pkgrel = 1 + pkgrel = 2 url = https://zapier.github.io/zapier-platform-cli/cli arch = x86_64 - license = Unlicensed + license = UNLICENSED makedepends = npm + makedepends = jq depends = nodejs noextract = zapier-platform-cli-8.1.0.tgz options = !strip @@ -2,18 +2,32 @@ pkgname=zapier-platform-cli pkgver=8.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="This CLI is your gateway to creating custom applications on the Zapier platform" arch=('x86_64') url="https://zapier.github.io/zapier-platform-cli/cli" license=('UNLICENSED') depends=('nodejs') -makedepends=('npm') +makedepends=('npm' 'jq') source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") sha256sums=('0c0d34b43b8937879ff7f9bdcd17a6b89243375f30b8d04ae3858824a80e53d5') noextract=("$pkgname-$pkgver.tgz") options=('!strip') package() { - npm install -g --user root --prefix "$pkgdir/usr" $noextract + npm install --cache "${srcdir}/npm-cache" -g --user root --prefix "$pkgdir"/usr "$srcdir"/$noextract + + # Non-deterministic race in npm gives 777 permissions to random directories. + # See https://github.com/npm/npm/issues/9359 for details. + find "${pkgdir}"/usr -type d -exec chmod 755 {} + + + # Remove references to $pkgdir + find "$pkgdir" -name package.json -print0 | xargs -0 sed -i '/_where/d' + + # Remove references to $srcdir + local tmppackage="$(mktemp)" + local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" + jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" + mv "$tmppackage" "$pkgjson" + chmod 644 "$pkgjson" } |