summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD17
1 files changed, 13 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ffcd3153fe93..832b3f762794 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,31 @@
pkgname=balena-cli
pkgdesc='balena.io command line interface'
-pkgver=11.7.3
-pkgrel=2
+pkgver=11.7.4
+pkgrel=1
arch=('i686' 'x86_64')
url='https://balena.io/'
_github_url="https://github.com/balena-io/balena-cli"
license=('APACHE')
depends=('nodejs>=6.0.0')
-makedepends=('npm' 'python2')
+makedepends=('npm' 'python2' 'jq')
source=(http://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz)
noextract=(${pkgname}-${pkgver}.tgz)
options=(!strip)
optdepends=('python: balena-preload')
optdepends_x86_64=('lib32-glibc: emulated builds')
replaces=('resin-cli')
-sha256sums=('acc3ba4e22cb4561e867a6a224e3ddfdf9feb2b63b34b0a25079afdb810c97af')
+sha256sums=('c60b298d110ff8d440d98415f5bb7d5e1d66fc119f99fff1a3131ffc5ed94a74')
package() {
npm install --global --production --no-shrinkwrap --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
+
+ find "${pkgdir}" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
+
+ find "${pkgdir}/usr" -type d -exec chmod 755 {} +
+ 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}"
}