Skip to content

Commit

Permalink
Merge pull request msys2#19685 from ognevny/add-gitui
Browse files Browse the repository at this point in the history
[new package] gitui 0.24.3
  • Loading branch information
podsvirov authored Jan 11, 2024
2 parents 8a9e580 + 7e8ed1a commit bdf8e8c
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions mingw-w64-gitui/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>

_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"
}

0 comments on commit bdf8e8c

Please sign in to comment.