1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/kmon/APKBUILD
psykose 39f6fef713 */*: cargo fetch with --target
this does not download deps that won't be used for the default build
target (the ctarget we are building for implicitly).
this makes quite a few fetches faster.. because a ton of crates download
a 10mb "windows-sys" that is never used, amongst other things.

maybe breaks a thing or two.
2023-02-11 16:56:41 +01:00

43 lines
1.3 KiB
Text

# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=kmon
pkgver=1.6.2
pkgrel=0
pkgdesc="Linux Kernel Manager and Activity Monitor"
arch="all !s390x !riscv64" # limited by cargo
url="https://kmon.cli.rs/"
license="GPL-3.0-or-later"
depends="kmod util-linux-misc" # dmesg
makedepends="cargo python3 libxcb-dev"
subpackages="$pkgname-doc
$pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion
"
source="$pkgname-$pkgver.tar.gz::https://github.com/orhun/kmon/archive/refs/tags/v$pkgver.tar.gz"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --release --frozen
}
check() {
cargo test --frozen
}
package() {
install -Dm0755 target/release/kmon -t "$pkgdir"/usr/bin
install -Dm0644 target/man/kmon.8 "$pkgdir"/usr/share/man/man8/kmon.8
install -Dm0644 target/completions/kmon.bash \
"$pkgdir"/usr/share/bash-completion/completions/kmon
install -Dm0644 target/completions/kmon.fish \
-t "$pkgdir"/usr/share/fish/completions
install -Dm0644 target/completions/_kmon \
-t "$pkgdir"/usr/share/zsh/site-functions
}
sha512sums="
db45b73f412277ac924d4777c3334cada2980ce238134e4219d434471bcec18bfd6fc5847a4d3a9c4e3b55baad6a66181b85ffec56c5fad4232bf73be1687945 kmon-1.6.2.tar.gz
"