summarylogtreecommitdiffstats
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
downloadaur-0162e04663727110566a383fb1b5930b6811142b.tar.gz
Add pkgbuild and srcinfo
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD31
2 files changed, 44 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f4928436a9d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = zx
+ pkgdesc = A tool for writing better scripts
+ pkgver = 1.1.1
+ pkgrel = 1
+ url = https://github.com/google/zx
+ arch = any
+ license = Apache
+ makedepends = npm
+ source = git+https://github.com/google/zx.git#commit=f021edc09a7ff83e613a439bd83365aaf5e0904b
+ sha256sums = SKIP
+
+pkgname = zx
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dce56d58fc5
--- /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