1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-17 21:57:07 +00:00
termux-packages/packages/oh-my-posh/build.sh
Termux Github Actions 6a7f704cf5 bump(main/oh-my-posh): 19.24.3
This commit has been automatically submitted by Github Actions.
2024-04-25 12:19:04 +00:00

35 lines
1.1 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://ohmyposh.dev
TERMUX_PKG_DESCRIPTION="A prompt theme engine for any shell."
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Steven Xu @stevenxxiu"
TERMUX_PKG_VERSION="19.24.3"
TERMUX_PKG_SRCURL=https://github.com/JanDeDobbeleer/oh-my-posh/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=4948798b82a3595a2be3259690ad6eac8ce055721ea6eaad28a57433a4987fd3
TERMUX_PKG_AUTO_UPDATE=true
termux_step_pre_configure() {
termux_setup_golang
go mod init oh-my-posh
go mod tidy
}
termux_step_make() {
cd "${TERMUX_PKG_SRCDIR}/src/"
local ldflags=''
ldflags+="-linkmode=external "
ldflags+="-X github.com/jandedobbeleer/oh-my-posh/src/build.Version=${TERMUX_PKG_VERSION} "
ldflags+="-X github.com/jandedobbeleer/oh-my-posh/src/build.Date=$(date +%F)"
go build -buildvcs=false -ldflags="${ldflags}" -o oh-my-posh
}
termux_step_make_install() {
cd "${TERMUX_PKG_SRCDIR}/src/"
install -Dm700 ./oh-my-posh "${TERMUX_PREFIX}/bin/"
install -d "${TERMUX_PREFIX}/share/oh-my-posh/themes"
install -m 600 ../themes/* -t "${TERMUX_PREFIX}/share/oh-my-posh/themes"
}