Date: Saturday, July 25, 2020 @ 13:03:00 Author: foxboron Revision: 665267
upgpkg: github-cli 0.11.0-2 Added: github-cli/trunk/PKGBUILD ----------+ PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) Added: PKGBUILD =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2020-07-25 13:03:00 UTC (rev 665267) @@ -0,0 +1,45 @@ +# Maintainer: Morten Linderud <[email protected]> +# Contributor: Richard Bradfield <[email protected]> + +pkgname=github-cli +pkgver=0.11.0 +pkgrel=2 +pkgdesc="The GitHub CLI" +arch=("x86_64") +url="https://github.com/cli/cli" +license=("MIT") +depends=("glibc") +makedepends=("go") +optdepends=("git: To interact with repositories") +source=("$pkgname-$pkgver.tar.gz::https://github.com/cli/cli/archive/v$pkgver.tar.gz") +sha256sums=('e2137491f269df179ded7066f641ae7879a40870be53170a0388310e904158b0') + +build() { + cd "cli-$pkgver" + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + + make GH_VERSION="v$pkgver" bin/gh manpages +} + +check(){ + cd "cli-$pkgver" + make test +} + +package() { + cd "cli-$pkgver" + install -Dm755 "bin/gh" "$pkgdir/usr/bin/gh" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" + + install -Dm644 -t "$pkgdir/usr/share/man/man1/" share/man/man1/* + + bin/gh completion -s bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/gh" + bin/gh completion -s zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_gh" + bin/gh completion -s fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/gh.fish" +}
