Package Details: esbuild 0.12.5-1

Git Clone URL: https://aur.archlinux.org/esbuild.git (read-only, click to copy)
Package Base: esbuild
Description: An extremely fast JavaScript/TypeScript bundler and minifier
Upstream URL: https://github.com/evanw/esbuild
Licenses: MIT
Submitter: simon04
Maintainer: simon04
Last Packager: simon04
Votes: 3
Popularity: 0.093987
First Submitted: 2020-10-16 19:34
Last Updated: 2021-05-29 18:54

Latest Comments

grawlinson commented on 2021-02-13 00:27

If anyone is interested, the following PKGBUILD builds this as a native binary, as opposed to a npm package.

# Maintainer: Simon Legner <Simon.Legner@gmail.com>
# Contributor: George Rawlinson <george@rawlinson.net.nz>

pkgname=esbuild
pkgver=0.8.44
pkgrel=1
pkgdesc="An extremely fast JavaScript/TypeScript bundler and minifier"
arch=('x86_64')
url="https://github.com/evanw/esbuild"
license=('MIT')
depends=('glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
b2sums=('daf5462aae22feaefb77f74a2dd327bebf05da7ec7869ca441fe5c56c39a7d221902acddd9cfc99f4188f429430a836d0e36e73f5625c026bdc049ef100480db')

prepare() {
  cd "$pkgname-$pkgver"
  mkdir -p build
}

build () {
  cd "$pkgname-$pkgver"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  go build -o build ./cmd/...
}

package() {
  cd "$pkgname-$pkgver"
  install -Dm755 -t "$pkgdir/usr/bin" "build/$pkgname"
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}