aboutsummaryrefslogtreecommitdiffstats
path: root/community/bat/APKBUILD
blob: 6d4da85fcccb81c94ff2cc2c2a73b5fa129c7d2b (plain) (blame)
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
# Contributor: Chloe Kudryavtsev <toast@toast.cafe>
# Maintainer: Chloe Kudryavtsev <toast@toast.cafe>
pkgname=bat
pkgver=0.18.3
pkgrel=0
pkgdesc="A cat(1) clone with wings"
url="https://github.com/sharkdp/bat"
arch="x86_64 x86 armhf armv7 aarch64 ppc64le" # limited by rust/cargo
license="Apache-2.0"
depends="less" # Required for RAW-CONTROL-CHARS
makedepends="cargo libgit2-dev"
checkdepends="bash"
options="net"
subpackages="$pkgname-doc
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="https://github.com/sharkdp/bat/archive/v$pkgver/bat-$pkgver.tar.gz
	minimize-size.patch
	"

export LIBGIT2_SYS_USE_PKG_CONFIG=1  # Use system libgit2

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

check() {
	cargo test --locked
}

package() {
	install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
	find "$srcdir" -name bat.1 -exec install -Dm644 {} \
		"$pkgdir/usr/share/man/man1/bat.1" \;

	find "$srcdir" -name bat.fish -exec install -Dm644 {} \
		"$pkgdir"/usr/share/fish/completions/bat.fish \;

	find "$srcdir" -name bat.zsh -exec install -Dm644 {} \
		"$pkgdir"/usr/share/zsh/site-functions/_bat \;
}

sha512sums="
b3608b385ab1959d5c84c8a823cec59adc005ec079ec5e6020bd119669f5a6e64975a498af3a5ffb707a76e230606e4a34183110900264caa85af1e0ca03f2a5  bat-0.18.3.tar.gz
efa83937c5704bfa91d3d12a31aa2a798279ce4572259eb3b87ffdbb7dd873a9a480626f01db2aeac489c277d9fc64a97938ca4bcc5d964951f1f52c752556fb  minimize-size.patch
"