From 854545107d7463f09cae142e0f6fcfcf537d6906 Mon Sep 17 00:00:00 2001 From: ognevnydemon Date: Tue, 5 Dec 2023 18:31:12 +0300 Subject: [PATCH] oh-my-posh: update to 19.2.1 --- mingw-w64-oh-my-posh/PKGBUILD | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/mingw-w64-oh-my-posh/PKGBUILD b/mingw-w64-oh-my-posh/PKGBUILD index b582f6d2d8290..d3e16a54dcdaf 100644 --- a/mingw-w64-oh-my-posh/PKGBUILD +++ b/mingw-w64-oh-my-posh/PKGBUILD @@ -3,17 +3,22 @@ _realname=oh-my-posh pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=18.14.0 +pkgver=19.2.1 pkgrel=1 pkgdesc="A prompt theme engine for any shell. (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32') +msys2_documentation_url="https://ohmyposh.dev" url="https://github.com/JanDeDobbeleer/oh-my-posh" license=('spdx:MIT') +msys2_references=( + 'aur: oh-my-posh' +) makedepends=("${MINGW_PACKAGE_PREFIX}-go" "${MINGW_PACKAGE_PREFIX}-cc") +optdepends=("${MINGW_PACKAGE_PREFIX}-ttf-font-nerd: to have icons in prompt themes") source=("${_realname}-${pkgver}.tar.gz::https://github.com/JanDeDobbeleer/oh-my-posh/archive/refs/tags/v${pkgver}.tar.gz") -sha256sums=('f90c4685bbc065fbbf9ea124e19382303de3b5aa1761e054e42d69750593c6b8') +sha256sums=('7147e1cfb16740ae0280447b355d59debadf17de388226a55ee955fdd6c3094a') build() { export GOOS=windows @@ -25,13 +30,24 @@ build() { export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" cd "$_realname-$pkgver/src" - go build + go build \ + -ldflags="-linkmode=external -X github.com/jandedobbeleer/oh-my-posh/src/build.Version=${pkgver} \ + -X github.com/jandedobbeleer/oh-my-posh/src/build.Date=$(date +%F)" \ + -o "${_realname}.exe" + + for _shell in bash zsh fish; do + "./${_realname}.exe" completion "${_shell}" > "${_realname}.${_shell}" + done } package() { cd "$_realname-$pkgver/src" - install -Dm 755 ./src.exe "${pkgdir}${MINGW_PREFIX}/bin/oh-my-posh.exe" + install -Dm 755 "./${_realname}.exe" "${pkgdir}${MINGW_PREFIX}/bin/oh-my-posh.exe" install -Dm 644 "../COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" install -d "${pkgdir}${MINGW_PREFIX}/share/oh-my-posh/themes" install -m 644 ../themes/* -t "${pkgdir}${MINGW_PREFIX}/share/oh-my-posh/themes" + + install -Dm 644 "${_realname}.bash" "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/${_realname}" + install -Dm 644 "${_realname}.fish" "${pkgdir}${MINGW_PREFIX}/share/fish/completions/${_realname}.fish" + install -Dm 644 "${_realname}.zsh" "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_${_realname}" }