# Maintainer: Morten Linderud # Maintainer: Eli Schwartz # Contributor: Richard Bradfield # Included in Slint by Didier Spaier didieratslintdotfr pkgname=github-cli pkgver=1.13.1 pkgrel=1slint slackdesc="$pkgname (The GitHub CLI)" arch=("x86_64") url="https://github.com/cli/cli" license=("MIT") depends=("glibc" "mailcap") makedepends=("go" "git") optdepends=("git: To interact with repositories") source=("$url/archive/v$pkgver.tar.gz") sha256sums=('1a19ab2bfdf265b5e2dcba53c3bd0b5a88f36eff4864dcc38865e33388b600c5') prepare() { cd "cli-${pkgver}" # TODO: These tests invoke the TTY and our container *really* does not like that rm pkg/cmd/auth/login/login_test.go } 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 -ldflags=-linkmode=external" make GH_VERSION="v$pkgver" 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 test make DESTDIR="$PKG" prefix="/usr" install cp -r share/ "$PKG"/usr install -Dm644 "LICENSE" "$PKG/usr/doc/${pkgname}-$pkgver/LICENSE" install -Dm644 "README.md" "$PKG/usr/doc/${pkgname}-$pkgver/README.md" }