Skip to content

Commit

Permalink
Merge pull request msys2#19280 from ognevnydemon/update-oh-my-posh
Browse files Browse the repository at this point in the history
oh-my-posh: update to 19.2.1
  • Loading branch information
lazka authored Dec 9, 2023
2 parents 05bd0b2 + 8545451 commit b74fd2c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions mingw-w64-oh-my-posh/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
}

0 comments on commit b74fd2c

Please sign in to comment.