according to my stars list: https://github.com/stars/ognevny/lists/%D0%BC%D0%B5%D0%B9%D0%BD%D1%82%D0%B5%D0%B9%D0%BD%D1%8E
70 lines
2.1 KiB
Bash
70 lines
2.1 KiB
Bash
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>
|
|
# Contributor: Wu Zhenyu <wuzy01@qq.com>
|
|
|
|
_realname=bottom
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
|
pkgver=0.11.0
|
|
pkgrel=1
|
|
pkgdesc="A graphical process/system monitor (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://github.com/ClementTsang/bottom"
|
|
msys2_documentation_url="https://clementtsang.github.io/bottom/${pkgver}"
|
|
msys2_references=(
|
|
'purl: pkg:cargo/bottom'
|
|
)
|
|
license=('spdx:MIT')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "git")
|
|
options=('!strip')
|
|
source=("git+${url}.git#tag=${pkgver}"
|
|
"ntapi-rs.tar.gz::https://crates.io/api/v1/crates/ntapi/0.4.1/download"
|
|
"ntapi-link-ntdll-arm64.patch")
|
|
sha256sums=('030ae0c65dab7d0f2e8ed53435d69a9284e976ef9bebd437cfc3b19d765b6623'
|
|
'e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4'
|
|
'9994d5b61f020f85f67df54c56c793bd4faf41e39b62ddd4e67c482b9a11b73e')
|
|
|
|
prepare() {
|
|
cd "${_realname}"
|
|
|
|
cat >> Cargo.toml <<END
|
|
|
|
[patch.crates-io]
|
|
ntapi = { path = "../ntapi-0.4.1" }
|
|
END
|
|
|
|
patch -d ../ntapi-0.4.1 -i ../ntapi-link-ntdll-arm64.patch
|
|
cargo update -p ntapi
|
|
|
|
cargo fetch --locked
|
|
}
|
|
|
|
build() {
|
|
cd "${_realname}"
|
|
|
|
export BTM_GENERATE=1
|
|
export WINAPI_NO_BUNDLED_LIBRARIES=1
|
|
cargo build --frozen --release
|
|
}
|
|
|
|
check() {
|
|
cd "${_realname}"
|
|
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS=true cargo test --frozen --release
|
|
}
|
|
|
|
package() {
|
|
# binary
|
|
install -vDm755 -t "${pkgdir}${MINGW_PREFIX}/bin" "${_realname}/target/release/btm"
|
|
|
|
# license
|
|
install -vDm644 -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" "${_realname}/LICENSE"
|
|
|
|
# manpage and completions
|
|
local _tmpdir="${_realname}/target/tmp/bottom"
|
|
install -Dm644 "${_tmpdir}/manpage/btm.1" "${pkgdir}${MINGW_PREFIX}/share/man/man1/btm.1"
|
|
install -Dm644 "${_tmpdir}/completion/_btm" "${pkgdir}${MINGW_PREFIX}/share/zsh/site-functions/_btm"
|
|
install -Dm644 "${_tmpdir}/completion/btm.bash" "${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/btm"
|
|
install -Dm644 "${_tmpdir}/completion/btm.fish" "${pkgdir}${MINGW_PREFIX}/share/fish/vendor_completions.d/btm.fish"
|
|
}
|