summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDušan Simić2021-05-08 09:49:15 +0200
committerDušan Simić2021-05-08 09:49:15 +0200
commit0162e04663727110566a383fb1b5930b6811142b (patch)
treeebc8a2c0b5379e3c36c995889992284656095e9a /PKGBUILD
downloadaur-0162e04663727110566a383fb1b5930b6811142b.tar.gz
Add pkgbuild and srcinfo
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 31 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dce56d58fc55
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Dušan Simić <dusan.simic1810@gmail.com>
+
+pkgname=zx
+pkgver=1.1.1
+_commit=f021edc09a7ff83e613a439bd83365aaf5e0904b
+pkgrel=1
+pkgdesc="A tool for writing better scripts"
+arch=("any")
+url="https://github.com/google/zx"
+license=("Apache")
+makedepends=("npm")
+source=("git+$url.git#commit=$_commit")
+sha256sums=("SKIP")
+
+build() {
+ cd "$pkgname"
+ npm install --production
+}
+
+package() {
+ local _npmdir="$pkgdir/usr/lib/node_modules"
+ mkdir -p "$_npmdir/$pkgname"
+ cp -r "$srcdir/$pkgname"/* "$_npmdir/$pkgname"
+ local _bindir="$pkgdir/usr/bin"
+ mkdir -p "$_bindir"
+ ln -s "/usr/lib/node_modules/$pkgname/zx.mjs" "$_bindir/zx"
+
+ install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/license/$pkgname/LICENSE"
+}
+
+# vim: syntax=sh