summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f4ffb0229d6185b4ecdc1043b604f3cc81df44c (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
pkgname=('alacritty-git' 'alacritty-terminfo-git')
_pkgname="alacritty"
pkgver=0.3.2.1203.gf3cc7c4
pkgrel=1
arch=('x86_64' 'i686')
url="https://github.com/jwilm/alacritty"
license=('Apache-2.0')
makedepends=('rust' 'cargo' 'cmake' 'fontconfig' 'freetype2' 'git' 'ncurses' 'desktop-file-utils' 'python' 'libxcb')
source=("$_pkgname::git+https://github.com/jwilm/alacritty.git")
sha256sums=('SKIP')

pkgver() {
	cd $_pkgname/alacritty
	echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

package_alacritty-git() {
	pkgdesc="A cross-platform, GPU-accelerated terminal emulator"
	depends=('freetype2' 'fontconfig' 'libxcb')
	provides=('alacritty')
	conflicts=('alacritty')

	cd $_pkgname

	env CARGO_INCREMENTAL=0 cargo build --release

	desktop-file-install -m 644 --dir "$pkgdir/usr/share/applications/" "$srcdir/$_pkgname/extra/linux/alacritty.desktop"

	install -D -m755 "$srcdir/$_pkgname/target/release/alacritty" "$pkgdir/usr/bin/alacritty"
	install -D -m644 "$srcdir/$_pkgname/extra/alacritty.man" "$pkgdir/usr/share/man/man1/alacritty.1"
	install -D -m644 "$srcdir/$_pkgname/extra/completions/alacritty.bash" "$pkgdir/usr/share/bash-completion/completions/alacritty"
	install -D -m644 "$srcdir/$_pkgname/extra/completions/_alacritty" "$pkgdir/usr/share/zsh/site-functions/_alacritty"
	install -D -m644 "$srcdir/$_pkgname/extra/completions/alacritty.fish" "$pkgdir/usr/share/fish/completions/alacritty.fish"
	install -D -m644 "$srcdir/$_pkgname/extra/logo/alacritty-term.svg" "$pkgdir/usr/share/pixmaps/Alacritty.svg"
}

package_alacritty-terminfo-git() {
	pkgdesc="Terminfo files for the alacritty terminal emulator"
	provides=('alacritty-terminfo')
	conflicts=('alacritty-terminfo')

	cd $_pkgname/extra

	install -dm 755 "$pkgdir/usr/share/terminfo/a/"
	tic -o "$pkgdir/usr/share/terminfo" -xe alacritty,alacritty-direct alacritty.info
}