aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bat/APKBUILD
blob: b134a7f1cf46446576f61d8a43b2f043058522a0 (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
# Contributor: Chloe Kudryavtsev <toast@toastin.space>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=bat
pkgver=0.12.1
pkgrel=1
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 clang-dev llvm-dev"
options="net"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/sharkdp/bat/archive/v$pkgver.tar.gz"

export CARGO_HOME="$srcdir"/cargo

build() {
	# libminiz_sys fails to build otherwise
	case "$CARCH" in
		x86)
			export CFLAGS="$CFLAGS -fno-stack-protector"
			;;
	esac


	cargo build \
		--release \
		--verbose
}

check() {
	cargo test --all \
		--release \
		--verbose
}

package() {
	install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
	install -Dm644 doc/"$pkgname".1 "$pkgdir"/usr/share/man/man1/"$pkgname".1
}
sha512sums="74ec162065f1b6f4b1363f107600a7364ba509b5338601b89bf1cd77d6f8290028d87fbf5e2938c6d26f782b0cc55da4161b69183e6748a46bf3644e5e2524b0  bat-0.12.1.tar.gz"