Files
ports/main/github-cli/spkgbuild
2022-12-23 07:38:46 +00:00

25 lines
796 B
Plaintext

# description : The GitHub CLI
# depends : go mailcap
name=github-cli
version=2.21.0
release=1
source="https://github.com/cli/cli/archive/v$version/$name-$version.tar.gz"
build() {
cd cli-$version
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"
make GH_VERSION="v$version" bin/gh manpages
bin/gh completion -s bash | install -Dm644 /dev/stdin share/bash-completion/completions/gh
bin/gh completion -s zsh | install -Dm644 /dev/stdin share/zsh/site-functions/_gh
bin/gh completion -s fish | install -Dm644 /dev/stdin share/fish/vendor_completions.d/gh.fish
make DESTDIR="${PKG}" prefix="/usr" install
}