aboutsummaryrefslogtreecommitdiffstats
path: root/community/kibi/APKBUILD
blob: 3982d126a30e329be64814811335416c10f99430 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=kibi
pkgver=0.2.2
pkgrel=1
pkgdesc="A text editor in ≤1024 lines of code, written in Rust"
url="https://github.com/ilai-deutel/kibi"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="(Apache-2.0 OR MIT) AND BSD-2-Clause"
makedepends="cargo"
source="https://github.com/ilai-deutel/kibi/archive/v$pkgver/$pkgname-$pkgver.tar.gz"

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"

prepare() {
	default_prepare

	# Optimize binary for size.
	cat >> Cargo.toml <<-EOF

		[profile.release]
		codegen-units = 1
		lto = true
		opt-level = "z"
		panic = "abort"
	EOF
}

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

check() {
	cargo test --locked
}

package() {
	cargo install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="da618363e38208140ec793c11a220ba32021683dd8e26874c0910f1194d9bdf9e7b5cda79ef29190944743abe31f18e8eed969b3f5466d1b82a31e09b2c7c225  kibi-0.2.2.tar.gz"