From 7e8ed1a5008fba507f3642adf61661b0dc62566e Mon Sep 17 00:00:00 2001 From: ognevnydemon Date: Mon, 8 Jan 2024 12:27:08 +0300 Subject: [PATCH] [new package] gitui 0.24.3 --- mingw-w64-gitui/PKGBUILD | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mingw-w64-gitui/PKGBUILD diff --git a/mingw-w64-gitui/PKGBUILD b/mingw-w64-gitui/PKGBUILD new file mode 100644 index 0000000000000..04c3e67d3850e --- /dev/null +++ b/mingw-w64-gitui/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Maksim Bondarenkov + +_realname=gitui +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.24.3 +pkgrel=1 +pkgdesc='Blazing fast terminal-ui for git written in Rust (mingw-w64)' +msys2_references=( + 'archlinux: gitui' +) +url='https://github.com/extrawurst/gitui' +arch=('any') +mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') +license=('spdx:MIT') +depends=("${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=("${MINGW_PACKAGE_PREFIX}-rust" + "${MINGW_PACKAGE_PREFIX}-python") +source=("https://github.com/extrawurst/gitui/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz") +sha256sums=('a5fc6b52a4db0037c3351b9743af49c8bb9ccff4dda5bdb064bab9e59f68fde2') + +prepare() { + cd "${srcdir}/${_realname}-${pkgver}" + + local _target="${CARCH}-pc-windows-gnu" + if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then + _target="${CARCH}-pc-windows-gnullvm" + fi + cargo fetch --locked --target "${_target}" +} + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + cargo build --frozen --release +} + +check() { + cd "${srcdir}/${_realname}-${pkgver}" + cargo test --frozen --release +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + + cargo install \ + --frozen \ + --offline \ + --no-track \ + --path . \ + --root "${pkgdir}${MINGW_PREFIX}" + + install -Dm644 {KEY_CONFIG,THEMES}.md -t "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + install -Dm644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md" +}