aboutsummaryrefslogtreecommitdiffstats
path: root/community/alacritty/APKBUILD
blob: f03bf1d1da7b33834a747887aa2a99c9564b76e6 (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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=alacritty
pkgver=0.4.2
pkgrel=0
pkgdesc="A cross-platform, GPU-accelerated terminal emulator"
url="https://github.com/jwilm/alacritty"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust/cargo
license="Apache-2.0"
depends="ncurses-terminfo-base"
makedepends="
	rust cargo cmake fontconfig-dev freetype-dev pkgconfig libxcb-dev python3
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-fish-completion:fishcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/jwilm/alacritty/archive/v$pkgver.tar.gz
	ignore-ft-fc-tests-font_mated.patch
	"
export CARGO_HOME="$srcdir"/cargo
export RUSTFLAGS="-C target-feature=-crt-static"

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

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

package() {
	install -Dm755 target/release/alacritty "$pkgdir"/usr/bin/alacritty
	install -Dm644 extra/alacritty.man "$pkgdir"/usr/share/man/man1/alacritty.1
	install -Dm644 alacritty.yml "$pkgdir"/etc/alacritty/alacritty.yml
	install -Dm644 extra/linux/Alacritty.desktop -t "$pkgdir"/usr/share/applications
	install -Dm644 extra/logo/alacritty-term.svg "$pkgdir"/usr/share/pixmaps/Alacritty.svg
	install -Dm644 extra/linux/io.alacritty.Alacritty.appdata.xml "$pkgdir"/usr/share/appdata/io.alacritty.Alacritty.appdata.xml
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	install -Dm644 "$builddir"/extra/completions/alacritty.bash \
		"$subpkgdir"/usr/share/bash-completion/completions/"$pkgname"
}

fishcomp() {
	depends=""
	pkgdesc="Fish completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel fish"

	install -Dm644 "$builddir"/extra/completions/alacritty.fish \
		"$subpkgdir"/usr/share/fish/completions/"$pkgname".fish
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -Dm644 "$builddir"/extra/completions/_alacritty \
		"$subpkgdir"/usr/share/zsh/site-functions/_"$pkgname"
}


sha512sums="0cf23114f97242497da5232a660465855ffd7d65c976d5cdfa3b876bdddc8a590eb840d4fcf8841945a6325a3655b20c6e5f3991925667e1b7d441d07e5906c8  alacritty-0.4.2.tar.gz
c6ae0a47abbd3583d0ccc8c98b71fb73995b2f65d04fee63b34572e44e859bb1cac6e56993a6d478fdb6de42f66e50e723eb01175117aeff1e4035f81ecf5473  ignore-ft-fc-tests-font_mated.patch"