makedeb
AWK interpreter written in go
Viewing /PKGBUILD
.
Click here to go back to the Git tree for goawk.
# Maintainer: Chris Howey <chris@howey.me>
pkgname=goawk
pkgver=1.21.0
pkgrel=1
pkgdesc="AWK interpreter written in go"
url="https://github.com/benhoyt/goawk"
license=('MIT')
arch=('amd64' 'armv6h' 'armv7h')
makedepends=('golang')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('3846a1bdacedb1c87edf7627ebd67fe29ce7b2cdafa77a8528eb45b22df5506d')
build() {
cd "$pkgname-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
-o "goawk" .
}
check() {
cd "$pkgname-$pkgver"
go test ./...
}
package() {
install -Dm755 "$pkgname-$pkgver/goawk" "$pkgdir/usr/bin/goawk"
install -Dm644 "$pkgname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}