# Maintainer: Dušan Simić pkgname=zx pkgver=1.12.0 pkgrel=1 pkgdesc="A tool for writing better scripts" arch=("any") url="https://github.com/google/zx" license=("Apache") depends=("nodejs") makedepends=("npm" "git") source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") sha512sums=("4037f2bd19801bf6cf146de7b903f410e37dbcf33e22493120c3b60791e94e5f8038c44341bb43c9caa06e3dfa5ff1c09b709d320ae26e8d65f71a836ad3be5d") build() { cd "$pkgname-$pkgver" npm install --production } package() { local _npmdir="$pkgdir/usr/lib/node_modules" mkdir -p "$_npmdir/$pkgname" cp -r "$srcdir/$pkgname-$pkgver"/* "$_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-$pkgver/LICENSE" "$pkgdir/usr/share/license/$pkgname/LICENSE" } # vim: syntax=sh