diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -1,34 +1,38 @@ # Maintainer: Dušan Simić <dusan.simic1810@gmail.com> +# Contributor: Alex D'Andrea <alex at dandrea dot io> pkgname=zx -pkgver=4.1.1 -pkgrel=2 +pkgver=7.2.3 +_commit=483cc88041feed8df4224860fdca1f76753eebf8 # tags/7.2.3 +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=("$url/archive/$pkgver.tar.gz") -sha512sums=('6ce37a5864b4e3e72f280001a8383705748248e9a31d1ed65e2fd290b78787e999a273369751730a577a2f3ef3290196cec66ae16e3f2d6688ff415406eeaeec') +source=("git+$url.git#commit=$_commit") +md5sums=('SKIP') build() { - cd "$pkgname-$pkgver" - npm install --production + cd "$pkgname" + npm install --ignore-scripts + npm run build + rm -r node_modules + npm install --ignore-scripts --production } package() { - cd "$pkgname-$pkgver" + cd "$pkgname" local _npmdir="$pkgdir/usr/lib/node_modules" 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" } -# vim: syntax=sh |