From 3b99ecf729ac2c646e71a3ea97c85263bf262226 Mon Sep 17 00:00:00 2001 From: psykose Date: Wed, 25 Sep 2024 04:06:55 +0200 Subject: [PATCH] user/jj: new package --- user/jj/template.py | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 user/jj/template.py diff --git a/user/jj/template.py b/user/jj/template.py new file mode 100644 index 0000000000..4ceb0240f7 --- /dev/null +++ b/user/jj/template.py @@ -0,0 +1,50 @@ +pkgname = "jj" +pkgver = "0.21.0" +pkgrel = 0 +build_style = "cargo" +hostmakedepends = [ + "cargo-auditable", + "pkgconf", +] +makedepends = [ + "libgit2-devel", + "libssh2-devel", + "openssl-devel", + "rust-std", + "zstd-devel", +] +checkdepends = ["openssh"] +pkgdesc = "Git-compatible VCS frontend" +maintainer = "psykose " +license = "Apache-2.0" +url = "https://martinvonz.github.io/jj" +source = f"https://github.com/martinvonz/jj/archive/refs/tags/v{pkgver}.tar.gz" +sha256 = "c38d98d7db42f08b799f5c51f33cd8454867bc4862a15aa0897b72f2d32eea0a" +# generates completions with host binary +options = ["!cross"] + + +def post_build(self): + for shell in ["bash", "fish", "nushell", "zsh"]: + with open(f"{self.cwd}/jj.{shell}", "w") as o: + self.do( + f"target/{self.profile().triplet}/release/jj", + "util", + "completion", + shell, + stdout=o, + ) + with open(f"{self.cwd}/jj.1", "w") as o: + self.do( + f"target/{self.profile().triplet}/release/jj", + "util", + "mangen", + stdout=o, + ) + + +def install(self): + self.install_bin(f"target/{self.profile().triplet}/release/jj") + for shell in ["bash", "fish", "nushell", "zsh"]: + self.install_completion(f"jj.{shell}", shell) + self.install_man("jj.1")