termux-packages/packages/hub/build.sh

37 lines
1.1 KiB
Bash
Raw Normal View History

2016-09-30 01:28:40 +02:00
TERMUX_PKG_HOMEPAGE=https://hub.github.com/
TERMUX_PKG_DESCRIPTION="Command-line wrapper for git that makes you better at GitHub"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="MIT"
2020-03-08 18:09:17 +01:00
TERMUX_PKG_VERSION=2.14.2
2016-09-30 01:28:40 +02:00
TERMUX_PKG_SRCURL=https://github.com/github/hub/archive/v${TERMUX_PKG_VERSION}.tar.gz
2020-03-08 18:09:17 +01:00
TERMUX_PKG_SHA256=e19e0fdfd1c69c401e1c24dd2d4ecf3fd9044aa4bd3f8d6fd942ed1b2b2ad21a
2016-09-30 01:28:40 +02:00
TERMUX_PKG_DEPENDS="git"
TERMUX_PKG_HOSTBUILD=true
termux_step_host_build() {
termux_setup_golang
mkdir ./gopath
export GOPATH="$PWD/gopath"
mkdir -p "${GOPATH}/src/github.com/github"
cp -a "${TERMUX_PKG_SRCDIR}" "${GOPATH}/src/github.com/github/hub"
cd "${GOPATH}/src/github.com/github/hub"
make man-pages
}
2016-09-30 01:28:40 +02:00
termux_step_make_install() {
termux_setup_golang
cd "$TERMUX_PKG_SRCDIR"
2016-09-30 01:28:40 +02:00
2018-07-11 11:55:14 +02:00
export GOPATH="${TERMUX_PKG_BUILDDIR}"
mkdir -p "${GOPATH}/src/github.com/github"
cp -a "${TERMUX_PKG_SRCDIR}" "${GOPATH}/src/github.com/github/hub"
cd "${GOPATH}/src/github.com/github/hub"
make bin/hub "prefix=$TERMUX_PREFIX"
install -Dm700 ./bin/hub "$TERMUX_PREFIX"/bin/hub
install -D -m 600 -t "$TERMUX_PREFIX"/share/man/man1 \
"$TERMUX_PKG_HOSTBUILD_DIR"/gopath/src/github.com/github/hub/share/man/man1/*.1
2016-09-30 01:28:40 +02:00
}