2020-11-25 08:14:33 -03:00

50 lines
1.3 KiB
Plaintext

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=github-cli
pkgver=1.3.0
pkgrel=0
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
"
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="4240c2a4b044b9ce2e1f383ba45c74f4aaee0aa1cb6370f05169a2ab324da191ed01e8ccbf01ae227796f222507739c2f3df5be1d9df10a8b6bdf8ffbdefa04b github-cli-1.3.0-1.3.0.tar.gz"