aboutsummaryrefslogtreecommitdiffstats
path: root/community/procs/APKBUILD
blob: 4044f57dd15542ddde7d4e81fed6de47c90d6b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
# Maintainer:
pkgname=procs
pkgver=0.14.0
pkgrel=0
pkgdesc="Modern replacement for ps written in Rust"
url="https://github.com/dalance/procs"
arch="all !s390x !riscv64" # limited by rust/cargo
license="MIT"
makedepends="cargo"
subpackages="
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="procs-$pkgver.tar.gz::https://github.com/dalance/procs/archive/v$pkgver.tar.gz"

export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	# Default features enables "docker" feature that doubles the size of
	# the resulting binary with unnecessary bloat!
	cargo build --release --frozen --no-default-features

	# generate shell completions
	target/release/procs --gen-completion bash
	target/release/procs --gen-completion fish
	target/release/procs --gen-completion zsh
}

check() {
	cargo test --frozen --no-default-features
}

package() {
	install -Dm755 target/release/procs "$pkgdir"/usr/bin/procs

	# install completions
	install -Dm644 procs.bash "$pkgdir"/usr/share/bash-completion/completions/procs
	install -Dm644 procs.fish "$pkgdir"/usr/share/fish/completions/procs.fish
	install -Dm644 _procs "$pkgdir"/usr/share/zsh/site-functions/_procs
}

sha512sums="
869c0b3fc996fe645c70dbc563558d86dcf945bd491e79977f1f4c909da47ebede131a6dbe2afe504712f170c83cce542901b932e3724fb41ad1b4401647230e  procs-0.14.0.tar.gz
"