From 4da843608c9890a6ea66793d0f3e741d0bf969c7 Mon Sep 17 00:00:00 2001 From: ttyyls Date: Wed, 25 Sep 2024 17:50:19 +0100 Subject: [PATCH] user/pastel: new package --- user/pastel/template.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 user/pastel/template.py diff --git a/user/pastel/template.py b/user/pastel/template.py new file mode 100644 index 00000000000..ef5fcdc56c9 --- /dev/null +++ b/user/pastel/template.py @@ -0,0 +1,27 @@ +pkgname = "pastel" +pkgver = "0.10.0" +pkgrel = 0 +build_style = "cargo" +hostmakedepends = ["cargo-auditable"] +makedepends = ["rust-std"] +pkgdesc = "CLI tool to generate, analyze, convert and manipulate colors" +maintainer = "ttyyls " +license = "Apache-2.0 OR MIT" +url = "https://github.com/sharkdp/pastel" +source = f"{url}/archive/refs/tags/v{pkgver}.tar.gz" +sha256 = "7848cd6d2ad8db6543b609dece7c9c28b4720c09fb13aeb204dd03d152159dd2" + + +def init_build(self): + self.make_build_env = { + "SHELL_COMPLETIONS_DIR": f"target/{self.profile().triplet}/release/completions" + } + + +def install(self): + self.install_license("LICENSE-MIT") + with self.pushd(f"target/{self.profile().triplet}/release"): + self.install_bin(f"pastel") + self.install_completion("completions/pastel.bash", "bash") + self.install_completion("completions/_pastel", "zsh") + self.install_completion("completions/pastel.fish", "fish")