From d85caa8596ccdd97d29c6d4ab9fa693eb21421fc Mon Sep 17 00:00:00 2001 From: Krishna Kanhaiya Date: Mon, 11 May 2020 01:52:57 +0530 Subject: [PATCH] =?UTF-8?q?gh:=20GitHub=E2=80=99s=20official=20command=20l?= =?UTF-8?q?ine=20tool=20=20(#5274)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gh/build.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/gh/build.sh diff --git a/packages/gh/build.sh b/packages/gh/build.sh new file mode 100644 index 0000000000..214eb0349b --- /dev/null +++ b/packages/gh/build.sh @@ -0,0 +1,26 @@ +TERMUX_PKG_HOMEPAGE=https://cli.github.com/ +TERMUX_PKG_DESCRIPTION="GitHub’s official command line tool" +TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_MAINTAINER="Krishna kanhaiya @kcubeterm" +TERMUX_PKG_VERSION=0.7.0 +TERMUX_PKG_SRCURL=https://github.com/cli/cli/archive/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=c8966ee2c9fe8138ae7773c66b9a85dd2bfbffc7ca26ce189b294ae0b3e4c05c + +termux_step_make() { + termux_setup_golang + + cd "$TERMUX_PKG_SRCDIR" + + export GOPATH=$TERMUX_PKG_BUILDDIR + mkdir -p "$GOPATH"/src/github.com/cli/ + mkdir -p "$TERMUX_PREFIX"/share/doc/gh + cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/cli/cli + cd "$GOPATH"/src/github.com/cli/cli/cmd/gh + go get -d -v + go build +} + +termux_step_make_install() { + install -Dm700 -t "$TERMUX_PREFIX"/bin "$GOPATH"/src/github.com/cli/cli/cmd/gh/gh + install -Dm600 -t "$TERMUX_PREFIX"/share/doc/gh/ "$TERMUX_PKG_SRCDIR"/docs/* +}