2022-04-04 17:34:13 +02:00
|
|
|
# Maintainer: Kamack38 <kamack38.biznes@gmail.com>
|
|
|
|
_pkgname='oh-my-posh'
|
|
|
|
pkgname="${_pkgname}-bin"
|
2022-07-21 20:53:37 +02:00
|
|
|
pkgver=8.22.0
|
2022-04-04 17:34:13 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A prompt theme engine for any shell."
|
2022-04-26 22:05:27 +02:00
|
|
|
arch=('x86_64' 'armv7h' 'aarch64')
|
2022-04-04 17:34:13 +02:00
|
|
|
url="https://github.com/JanDeDobbeleer/oh-my-posh"
|
|
|
|
license=('MIT')
|
2022-04-26 22:05:27 +02:00
|
|
|
makedepends=('curl' 'grep' 'sed' 'unzip')
|
2022-04-04 17:34:13 +02:00
|
|
|
provides=("${_pkgname}")
|
|
|
|
conflicts=("${_pkgname}")
|
2022-07-21 20:53:37 +02:00
|
|
|
sha256sums=('e18bad4206068a260b603613b0a68daaf9b2c04ae32609a6651454318aff5cc5'
|
2022-05-17 22:53:10 +02:00
|
|
|
'a5308c4e51268229a039ec4ec9a251a4cdb89d9380383e6e13aeba64a74f19ad')
|
2022-07-21 20:53:37 +02:00
|
|
|
sha256sums_x86_64=('f791c5584d3de1c3db41556e4da94f1d23463530d2e20e5afc67ba364c865418')
|
|
|
|
sha256sums_armv7h=('ab7402b6356ed70f17780ee3977348e310cb768a73d9bfe7e475d69f680fb2e9')
|
|
|
|
sha256sums_aarch64=('6ecead4318e16374417c56c44628fc5bc858a4dfeb6467007aeeee6481235c1b')
|
2022-05-17 22:53:10 +02:00
|
|
|
source=(
|
|
|
|
"themes-${sha256sums[0]}.zip::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/themes.zip"
|
|
|
|
"LICENSE-${sha256sums[1]}::https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v${pkgver}/COPYING"
|
|
|
|
)
|
2022-05-07 17:46:58 +02:00
|
|
|
source_x86_64=("posh-linux-amd64-${sha256sums_x86_64}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-amd64")
|
|
|
|
source_armv7h=("posh-linux-arm-${sha256sums_armv7h}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm")
|
|
|
|
source_aarch64=("posh-linux-arm64-${sha256sums_aarch64}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm64")
|
2022-04-26 22:05:27 +02:00
|
|
|
noextract=('themes.zip')
|
2022-04-04 17:34:13 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2022-04-05 15:52:39 +02:00
|
|
|
curl --silent -L "https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest" | # Get latest release from GitHub api
|
|
|
|
grep '"tag_name":' | # Get tag line
|
2022-04-04 17:34:13 +02:00
|
|
|
sed -E 's/.*"([^"]+)".*/\1/' |
|
|
|
|
sed 's/v//'
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-05-17 22:53:10 +02:00
|
|
|
install -Dm 644 "LICENSE-${sha256sums[1]}" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
|
2022-04-26 22:05:27 +02:00
|
|
|
if [[ "$CARCH" = 'x86_64' ]]; then
|
2022-05-17 22:53:10 +02:00
|
|
|
install -Dm 755 "${srcdir}/posh-linux-amd64-${sha256sums_x86_64}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
elif [[ "$CARCH" = 'armv7h' ]]; then
|
2022-05-17 22:53:10 +02:00
|
|
|
install -Dm 755 "${srcdir}/posh-linux-arm-${sha256sums_armv7h}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
elif [[ "$CARCH" = 'aarch64' ]]; then
|
2022-05-17 22:53:10 +02:00
|
|
|
install -Dm 755 "${srcdir}/posh-linux-arm64-${sha256sums_aarch64}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "${pkgdir}/usr/share/oh-my-posh/themes"
|
2022-05-07 17:46:58 +02:00
|
|
|
unzip "${srcdir}/themes-${sha256sums}.zip" -d "${pkgdir}/usr/share/oh-my-posh/themes"
|
2022-04-04 17:34:13 +02:00
|
|
|
}
|