chore(main/restish): fix build and simplify build recipe

This commit is contained in:
Henrik Grimler 2022-08-15 20:56:58 +02:00
parent 195b028b9f
commit 501d0ec8c0
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
1 changed files with 9 additions and 5 deletions

View File

@ -4,17 +4,21 @@ TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE_FILE="LICENSE.md"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.14.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/danielgtaylor/restish/archive/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256="2688340ff307aa522325afab40b9eaf6847d0b4b6a7a9c05f041056408b3fc50"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make() {
termux_setup_golang
cd "$TERMUX_PKG_SRCDIR"
export GOPATH="${TERMUX_PKG_BUILDDIR}"
go build
termux_setup_golang
go mod init || :
go mod tidy
go build
}
termux_step_make_install() {
install -Dm755 -t "${TERMUX_PREFIX}/bin" "${TERMUX_PKG_SRCDIR}/restish"
install -Dm755 -t "${TERMUX_PREFIX}/bin" restish
}