Skip to content

Commit

Permalink
oh-my-posh: update to 19.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ognevny authored and Biswa96 committed Jan 8, 2024
1 parent f42aaf1 commit 10adda9
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions mingw-w64-oh-my-posh/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=oh-my-posh
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=19.3.1
pkgver=19.4.0
pkgrel=1
pkgdesc="A prompt theme engine for any shell. (mingw-w64)"
arch=('any')
Expand All @@ -18,7 +18,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-go"
"${MINGW_PACKAGE_PREFIX}-cc")
optdepends=("${MINGW_PACKAGE_PREFIX}-ttf-font-nerd: to have icons in prompt themes")
source=("https://github.com/JanDeDobbeleer/oh-my-posh/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('c0b8b75ed1a51b2558aa5db39c7c0004495d699b4e9dafa1393162819d510b26')
sha256sums=('fbc44e9afb243e5abc473413cb02f73d3fa3cf645dc94fcee5f212004f239396')

build() {
export GOOS=windows
Expand All @@ -27,27 +27,22 @@ build() {
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"

cd "$_realname-$pkgver/src"
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 "./${_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 -Dm755 "./${_realname}.exe" "${pkgdir}${MINGW_PREFIX}/bin/oh-my-posh.exe"
install -Dm644 "../COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
install -Dm644 ../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}"
"./${_realname}.exe" completion bash | install -Dm644 /dev/stdin "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/${_realname}"
"./${_realname}.exe" completion fish | install -Dm644 /dev/stdin "${pkgdir}${MINGW_PREFIX}/share/fish/completions/${_realname}.fish"
"./${_realname}.exe" completion zsh | install -Dm644 /dev/stdin "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_${_realname}"
}

0 comments on commit 10adda9

Please sign in to comment.