Skip to content

Commit

Permalink
user/jj: new package
Browse files Browse the repository at this point in the history
  • Loading branch information
nekopsykose committed Sep 25, 2024
1 parent 61a5e5b commit 3b99ecf
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions user/jj/template.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
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")

0 comments on commit 3b99ecf

Please sign in to comment.