contrib/wire-go/Pkgfile

26 lines
617 B
Plaintext

# Description: Compile-time Dependency Injection for Go
# URL: https://github.com/google/wire
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: go
name=wire-go
version=0.6.0
release=1
source=(https://github.com/google/wire/archive/v$version/wire-$version.tar.gz)
build() {
cd wire-$version
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
mkdir "$PKGMK_SOURCE_DIR/gopath" || true
export GOPATH="$PKGMK_SOURCE_DIR/gopath"
go mod download
go build ./cmd/wire
install -Dm755 wire -t $PKG/usr/bin/
}