summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 9 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a5de73ef7cc..91208c4ce118 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = zx
pkgdesc = A tool for writing better scripts
pkgver = 7.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/google/zx
arch = any
license = Apache
diff --git a/PKGBUILD b/PKGBUILD
index 4af6a9fd600d..b7e12286aefc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=zx
pkgver=7.0.1
_commit=cc9be7f09486d2dde8c8796ef6c03865b0224a7b
-pkgrel=1
+pkgrel=2
pkgdesc='A tool for writing better scripts'
arch=(any)
url=https://github.com/google/zx
@@ -15,7 +15,10 @@ md5sums=(SKIP)
build() {
cd "$pkgname"
- npm install --production
+ npm install --ignore-scripts
+ npm run build
+ rm -r node_modules
+ npm install --ignore-scripts --production
}
package() {
@@ -25,9 +28,9 @@ package() {
install -d "$_npmdir/$pkgname"
cp -r * "$_npmdir/$pkgname"
- local _bindir="$pkgdir/usr/bin"
- mkdir -p "$_bindir"
- ln -s "/usr/lib/node_modules/$pkgname/zx.mjs" "$_bindir/zx"
+ mkdir -p "$pkgdir/usr/bin"
+ ln -s "$(realpath -m --relative-to=/usr/bin /usr/lib/node_modules/$pkgname/build/cli.js)" "$pkgdir/usr/bin/zx"
+ chmod 0755 "$pkgdir/usr/bin/zx"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}