upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / esbuild / trunk / PKGBUILD
blobb773812c866d813762047af79b2f35b5249c4163
1 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
2 # Contributor: Daniel Milde <daniel@milde.cz>
3 # Contributor: George Rawlinson <george@rawlinson.net.nz>
5 pkgname=esbuild
6 pkgver=0.17.19
7 pkgrel=1
8 pkgdesc="An extremely fast JavaScript and CSS bundler and minifier."
9 arch=('x86_64')
10 url="https://esbuild.github.io/"
11 license=('MIT')
12 depends=(glibc)
13 makedepends=(go)
14 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/evanw/${pkgname}/archive/v${pkgver}.tar.gz")
15 sha512sums=('fbd0cecd259120e91af15127d62c0639008cbee666d3baaea3e38105b4ee50f7479e4a3a9b8e6abd6ab62a38713fdd3c422942c7243d77e50723fc6179bb7b9d')
17 export CGO_CPPFLAGS="${CPPFLAGS}"
18 export CGO_CFLAGS="${CFLAGS}"
19 export CGO_CXXFLAGS="${CXXFLAGS}"
20 export CGO_LDFLAGS="${LDFLAGS}"
21 export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
23 build() {
24     cd "${pkgname}-${pkgver}"
25     go build \
26     -trimpath \
27     -buildmode=pie \
28     -mod=readonly \
29     -modcacherw \
30     -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
31     ./cmd/esbuild
34 package() {
35     cd "${pkgname}-${pkgver}"
36     install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
37     install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "LICENSE.md"