From 19e40e006ddc1d1ca7660a259070ac98435ca6d0 Mon Sep 17 00:00:00 2001 From: Nathan Fritch Date: Mon, 19 Jun 2023 22:36:18 -0500 Subject: [PATCH] contrib/alacritty: new package (0.12.2) --- contrib/alacritty-terminfo | 1 + contrib/alacritty/template.py | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 120000 contrib/alacritty-terminfo create mode 100644 contrib/alacritty/template.py diff --git a/contrib/alacritty-terminfo b/contrib/alacritty-terminfo new file mode 120000 index 0000000000..f681b820f6 --- /dev/null +++ b/contrib/alacritty-terminfo @@ -0,0 +1 @@ +alacritty \ No newline at end of file diff --git a/contrib/alacritty/template.py b/contrib/alacritty/template.py new file mode 100644 index 0000000000..adf3d599e0 --- /dev/null +++ b/contrib/alacritty/template.py @@ -0,0 +1,45 @@ +pkgname = "alacritty" +pkgver = "0.12.2" +pkgrel = 0 +build_style = "cargo" +hostmakedepends = ["cargo", "cmake", "pkgconf", "python", "ncurses"] +makedepends = ["fontconfig-devel", "freetype-devel", "libxcb-devel", "rust"] +depends = [f"alacritty-terminfo={pkgver}-r{pkgrel}"] +pkgdesc = "Cross-platform, GPU-accelerated terminal emulator" +maintainer = "nbfritch " +license = "MIT OR Apache-2.0" +url = "https://github.com/alacritty/alacritty" +source = f"{url}/archive/refs/tags/v{pkgver}.tar.gz" +sha256 = "285b44d2d2e83118ab7fe61d575811bb85d5e21147808171bd0e583e9e794748" + + +def do_install(self): + self.cargo.install(wrksrc="alacritty") + self.install_man("extra/alacritty.man", name="alacritty", cat=1) + self.install_man("extra/alacritty-msg.man", name="alacritty-msg", cat=1) + self.install_license("LICENSE-MIT") + self.install_completion("extra/completions/alacritty.bash", "bash") + self.install_completion("extra/completions/alacritty.fish", "fish") + self.install_completion("extra/completions/_alacritty", "zsh") + self.install_file("extra/linux/Alacritty.desktop", "usr/share/applications") + self.install_file( + "extra/logo/alacritty-term.svg", + "usr/share/icons/hicolor/scalable/apps/", + name="Alacritty.svg", + ) + self.install_dir("usr/share/terminfo") + self.do( + "tic", + "-xe", + "alacritty,alacritty-direct", + "-o", + self.chroot_destdir / "usr/share/terminfo", + "extra/alacritty.info", + ) + + +@subpackage("alacritty-terminfo") +def _tinfo(self): + self.pkgdesc = f"{pkgdesc} (terminfo data)" + + return ["usr/share/terminfo"]