aboutsummaryrefslogtreecommitdiffstats
path: root/community/broot/APKBUILD
blob: 2eb16fffd7fbe52d581556d983b5fcf3c08d78ed (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
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=broot
pkgver=1.21.3
pkgrel=0
pkgdesc="New way to see and navigate directory trees"
url="https://github.com/Canop/broot"
# riscv64: TODO
# s390x: fails to build nix crate
arch="all !riscv64 !s390x"
license="MIT"
makedepends="
	cargo
	libgit2-dev
	libxcb-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="https://github.com/Canop/broot/archive/v$pkgver/broot-$pkgver.tar.gz
	update-git2.patch
	image-features.patch
	syntect-without-onig.patch
	"

export CARGO_PROFILE_RELEASE_OPT_LEVEL=2

prepare() {
	cargo fetch --locked --target="$CTARGET"

	default_prepare

	cargo fetch --target="$CTARGET"  # update after patching
}

build() {
	cargo build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/broot -t "$pkgdir"/usr/bin/
	install -D -m644 man/page "$pkgdir"/usr/share/man/man1/broot.1

	cd "$(find target/release -name broot.bash -exec dirname {} \; -quit)"

	install -D -m644 broot.bash "$pkgdir"/usr/share/bash-completion/completions/broot
	install -D -m644 _broot -t "$pkgdir"/usr/share/zsh/site-functions/
	install -D -m644 broot.fish -t "$pkgdir"/usr/share/fish/completions/
}

sha512sums="
9528f5e5d3c387bd35c3459196a5dd4163b1fdce5b905c648729cf3e3c4ed9801e950c23173f7f7525d329fa4681113d9cf1b87b2d60dc65d4ac464a6c401e26  broot-1.21.3.tar.gz
b913cd74cf4d734c1626427efbdcd5c55b4ddfdfdf18fb15743659890bfe265c4e9c463143b63e550d2feebecb90a5be6b3251ec09ba9dd85174973566c997a6  update-git2.patch
4279757e6e44d797ed9cae545bf8c1d56a7e4d7cf66c453b91e313f57e20c2a22064274c4e9039ef73f2f1f1500699dbdfe8907b52752f65ea056f22238faf66  image-features.patch
c2dc430f92ed76ab1aa97034e4c54e3039cb7a093d9bd8f81daaea604e135bb20b6cebd58721c18c13c7107a774c2e1aceb0a25466b2926775065bae5e958ad1  syntect-without-onig.patch
"