diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-04-20 15:50:25 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-04-20 15:50:25 +0000 |
| commit | 7fa739d0a43d0b0097e6f4f7710dbea0c572ddaa (patch) | |
| tree | d480314e5e86d8c8fc061c3be85f157e7fa243d6 /dev-util/github-cli/github-cli-2.8.0.ebuild | |
| parent | 75a7217abf800cdc40a725805f128d7fd7c9f38a (diff) | |
| download | baldeagleos-repo-7fa739d0a43d0b0097e6f4f7710dbea0c572ddaa.tar.gz baldeagleos-repo-7fa739d0a43d0b0097e6f4f7710dbea0c572ddaa.tar.xz baldeagleos-repo-7fa739d0a43d0b0097e6f4f7710dbea0c572ddaa.zip | |
Adding metadata
Diffstat (limited to 'dev-util/github-cli/github-cli-2.8.0.ebuild')
| -rw-r--r-- | dev-util/github-cli/github-cli-2.8.0.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-util/github-cli/github-cli-2.8.0.ebuild b/dev-util/github-cli/github-cli-2.8.0.ebuild new file mode 100644 index 000000000000..ec899ad1ea48 --- /dev/null +++ b/dev-util/github-cli/github-cli-2.8.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit bash-completion-r1 go-module + +DESCRIPTION="GitHub CLI" +HOMEPAGE="https://github.com/cli/cli" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cli/cli.git" +else + SRC_URI="https://github.com/cli/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + KEYWORDS="~amd64 ~riscv" + S="${WORKDIR}/cli-${PV}" +fi + +LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0" +SLOT="0" + +RDEPEND=">=dev-vcs/git-1.7.3" + +RESTRICT="test" + +src_unpack() { + if [[ ${PV} == *9999 ]]; then + git-r3_src_unpack + go-module_live_vendor + else + go-module_src_unpack + fi +} + +src_compile() { + [[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}" + # Go LDFLAGS are not the same as GCC/Binutils LDFLAGS + unset LDFLAGS + # Once we set up cross compiling, this line will need to be adjusted + # to compile for the target. + # Everything else in this function happens on the host. + emake + + einfo "Building man pages" + emake manpages + + einfo "Building completions" + go run ./cmd/gh completion -s bash > gh.bash-completion || die + go run ./cmd/gh completion -s zsh > gh.zsh-completion || die +} + +src_install() { + dobin bin/gh + dodoc README.md + + doman share/man/man?/gh*.? + + newbashcomp gh.bash-completion gh + insinto /usr/share/zsh/site-functions + newins gh.zsh-completion _gh +} |
