-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathgithub-cli.tmpl
More file actions
52 lines (39 loc) · 1.09 KB
/
github-cli.tmpl
File metadata and controls
52 lines (39 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-r1 go-module
EGO_SUM=(
{{gosum}})
go-module_set_globals
DESCRIPTION="GitHub CLI"
HOMEPAGE="https://github.com/cli/cli"
SRC_URI="{{src_uri}}"
KEYWORDS="*"
LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0"
SLOT="0"
RDEPEND=">=dev-vcs/git-1.7.3"
RESTRICT+=" test "
post_src_unpack() {
mv ${WORKDIR}/{{ github_user }}-{{ github_repo }}-* ${S} || die
}
src_compile() {
export GH_VERSION="v{{version}}"
# 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
}