0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 14:13:36 +00:00
2023-08-20 23:48:21 +03:00

27 lines
750 B
Bash

TERMUX_PKG_HOMEPAGE=https://gitea.com/gitea/tea
TERMUX_PKG_DESCRIPTION="The official CLI for Gitea"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.9.2"
TERMUX_PKG_SRCURL=https://gitea.com/gitea/tea/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=b5a944de8db7d5af4aa87e9640261c925f094d2b6d26c4faf2701773acab219b
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
termux_setup_golang
}
termux_step_make() {
go mod vendor
local SDK_VER=$(go list -f '{{.Version}}' -m code.gitea.io/sdk/gitea)
go build \
-ldflags "-X 'main.Version=${TERMUX_PKG_VERSION}' -X 'main.SDK=${SDK_VER}'" \
-o tea
}
termux_step_make_install() {
install -Dm700 -t "$TERMUX_PREFIX"/bin ./tea
}