58 lines
1.5 KiB
Plaintext

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
# Maintainer: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
pkgname=github-cli
pkgver=2.1.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"
license="MIT"
depends="git"
makedepends="go"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
"
source="https://github.com/cli/cli/archive/v$pkgver/github-cli-$pkgver-$pkgver.tar.gz
"
builddir="$srcdir/cli-$pkgver"
prepare() {
default_prepare
# TODO: These tests invoke the TTY and our container *really* does not like that
# Copied from https://github.com/archlinux/svntogit-community/blob/packages/github-cli/trunk/PKGBUILD
rm pkg/cmd/auth/login/login_test.go
}
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
}
check() {
go test -v ./...
}
package() {
install -Dm755 bin/gh "$pkgdir"/usr/bin/gh
mkdir -p "$pkgdir"/usr
cp -r share "$pkgdir"/usr
}
sha512sums="
7432bc93d4c0afd22d34861b6602bd1e185f8483369e9151ca8843e5b7329014ac90a55c5c393a793cdee6ceed7b6b0b3488a4d838f595738a305b203c9bb597 github-cli-2.1.0-2.1.0.tar.gz
"