forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request msys2#19685 from ognevny/add-gitui
[new package] gitui 0.24.3
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |