# Contributor: Leo # Maintainer: Leo pkgname=github-cli pkgver=1.0.0 pkgrel=1 pkgdesc="CLI for dealing with GitHub" options="net chmod-clean" # Need to fetch modules and clean them up url="https://cli.github.com" arch="all !mips !mips64" license="MIT" depends="git" makedepends="go" subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion $pkgname-fish-completion " source="https://github.com/cli/cli/archive/v$pkgver/github-cli-$pkgver-$pkgver.tar.gz fix-tests.patch::https://github.com/cli/cli/commit/859bf445e745fc0c0b53620d5e2585cf62c90c8b.patch " builddir="$srcdir/cli-$pkgver" build() { CGO_CPPFLAGS="$CPPFLAGS" \ CGO_CFLAGS="$CFLAGS" \ CGO_CXXFLAGS="$CXXFLAGS" \ CGO_LDFLAGS="$LDFLAGS" \ \ make GH_VERSION="v$pkgver" bin/gh manpages bin/gh completion -s bash | install -Dm0644 /dev/stdin \ share/bash-completion/completions/gh bin/gh completion -s zsh | install -Dm0644 /dev/stdin \ share/zsh/site-functions/_gh bin/gh completion -s fish | install -Dm0644 /dev/stdin \ share/fish/completions/gh.fish } check() { go test -v ./... } package() { install -Dm755 bin/gh "$pkgdir"/usr/bin/gh mkdir -p "$pkgdir"/usr cp -r share "$pkgdir"/usr } sha512sums="c4b9c041ff8e63551ea6d94ec65017f8d264bc5b5c5b70b0525fcaea672c34f5e6aa57d096decef35891fb8d51a732c15835b0354e712b9dda353b7c869988c4 github-cli-1.0.0-1.0.0.tar.gz 9d3d7877fd76593a1c9fd6bc872d78baa30e70d2ab387a8c6e109a6f9add9802113e0fce7482485c952a67e345d14d6526f52147610a4bf52738db3e1c60419b fix-tests.patch"