2022-04-04 17:34:13 +02:00
|
|
|
# Maintainer: Kamack38 <kamack38.biznes@gmail.com>
|
|
|
|
_pkgname='oh-my-posh'
|
|
|
|
pkgname="${_pkgname}-bin"
|
2022-06-30 20:51:42 +02:00
|
|
|
pkgver=8.8.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-06-30 20:51:42 +02:00
|
|
|
sha256sums=('a0a33ee1d4fab254ad2da2843e17173bcdf7b798165afc5060320c4da31a7579'
|
2022-05-17 22:53:10 +02:00
|
|
|
'a5308c4e51268229a039ec4ec9a251a4cdb89d9380383e6e13aeba64a74f19ad')
|
2022-06-30 20:51:42 +02:00
|
|
|
sha256sums_x86_64=('92d2d78bd9e647949f3f30d8735c4283cf728d758cc0ae5b6c372b817cdaec25')
|
|
|
|
sha256sums_armv7h=('6edacc20191c7eccd4219fa4dde97e3ba4ad0833593e7e5c6fc15b969ceb6eb6')
|
|
|
|
sha256sums_aarch64=('fbe03472fa1db00d50a61ff193f93896f79b3b1feaf0b95f144f438ebecaf4f8')
|
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
|
|
|
}
|