aboutsummaryrefslogtreecommitdiffstats
path: root/community/alacritty/APKBUILD
blob: 2976d542ae6cc5e02ec81b135930b83f52c65423 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor:
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=alacritty
pkgver=0.13.1
pkgrel=0
pkgdesc="cross-platform, GPU-accelerated terminal emulator"
url="https://github.com/alacritty/alacritty"
# s390x: incompatible with nix crate
arch="all !s390x"
license="Apache-2.0"
# libxi, libcursor, and libxkbcommon-x11 are loaded via dlopen by x11-rs and xkbcommon-dl crate.
depends="ncurses-terminfo-base wayland-libs-egl libxi libxcursor libxkbcommon-x11"
makedepends="
	cargo
	cargo-auditable
	cmake
	fontconfig-dev
	freetype-dev
	libxcb-dev
	libxkbcommon-dev
	python3
	rust
	scdoc
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/alacritty/alacritty/archive/refs/tags/v$pkgver.tar.gz
	"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	# Compile all man pages.
	local scd
	for scd in extra/man/*.scd; do
		scdoc < "$scd" > "${scd%.*}"
	done

	cargo auditable build --release --frozen
}

check() {
	cargo test --workspace --release --frozen
}

package() {
	install -Dm755 target/release/alacritty "$pkgdir"/usr/bin/alacritty

	# Install all man pages
	local f
	for f in extra/man/*.?; do
		install -Dm644 "$f" "$pkgdir"/usr/share/man/man${f##*.}/${f##*/}
	done

	# Install addition documentation files.
	install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname \
		README.md CHANGELOG.md docs/*

	# Install desktop files.
	install -Dm644 extra/linux/Alacritty.desktop -t "$pkgdir"/usr/share/applications
	install -Dm644 extra/logo/alacritty-term.svg \
		"$pkgdir"/usr/share/icons/hicolor/scalable/apps/Alacritty.svg
	install -Dm644 extra/linux/org.alacritty.Alacritty.appdata.xml \
		"$pkgdir"/usr/share/metainfo/org.alacritty.Alacritty.appdata.xml

	# Install completion files.
	install -Dm644 extra/completions/alacritty.bash \
		"$pkgdir"/usr/share/bash-completion/completions/"$pkgname"
	install -Dm644 extra/completions/alacritty.fish \
		"$pkgdir"/usr/share/fish/vendor_completions.d/"$pkgname".fish
	install -Dm644 extra/completions/_alacritty \
		"$pkgdir"/usr/share/zsh/site-functions/_"$pkgname"
}

sha512sums="
d88359879dd25b8b36e649076852d86957cab64996b8d21cb1ca930658664a6f6e4fd5f9f5266fc6aa3889e122a10001da4922f635eff6a5c62db13af963f342  alacritty-0.13.1.tar.gz
"