aboutsummaryrefslogtreecommitdiffstats
path: root/community/csview/APKBUILD
blob: c9b7260889c747ef94b60e832c346086daf5af5a (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=csview
pkgver=1.2.2
pkgrel=0
pkgdesc="Pretty csv viewer for cli with cjk/emoji support"
url="https://github.com/wfxr/csview"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # blocked by rust/cargo
license="Apache-2.0 OR MIT"
makedepends="cargo"
subpackages="
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="https://github.com/wfxr/csview/archive/v$pkgver/csview-$pkgver.tar.gz"

export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_LTO="true"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
export CARGO_PROFILE_RELEASE_PANIC="abort"

prepare() {
	default_prepare

	cargo fetch --locked
}

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

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/

	install -D -m644 completions/bash/$pkgname.bash \
		"$pkgdir"/usr/share/bash-completion/completions/$pkgname

	install -D -m644 completions/fish/* -t "$pkgdir"/usr/share/fish/completions/
	install -D -m644 completions/zsh/* -t "$pkgdir"/usr/share/zsh/site-functions/
}

sha512sums="
b4248c7fdf22b1dc3a23eb3c2792bd05cce945a4b646500541d6927e1722be79c78aa5421b74421c35ca70ab814468db27e5bf6016a942c856568b6c1a734010  csview-1.2.2.tar.gz
"