diff --git a/user/wgcf/template.py b/user/wgcf/template.py new file mode 100644 index 0000000000..54f83b774e --- /dev/null +++ b/user/wgcf/template.py @@ -0,0 +1,24 @@ +pkgname = "wgcf" +pkgver = "2.2.22" +pkgrel = 0 +build_style = "go" +hostmakedepends = ["go"] +pkgdesc = "Unofficial CLI for Cloudflare Warp" +maintainer = "cassiofb-dev " +license = "MIT" +url = "https://github.com/ViRb3/wgcf" +source = f"{url}/archive/refs/tags/v{pkgver}.tar.gz" +sha256 = "949cfc61681683ef44af9561bf8080ea87f04d4da00f97d0512143956b6e27b9" + + +def post_build(self): + for shell in ["bash", "fish", "zsh"]: + with open(self.cwd / f"wgcf.{shell}", "w") as f: + self.do(f"{self.make_dir}/wgcf", "completion", shell, stdout=f) + + +def post_install(self): + self.install_license("LICENSE") + + for shell in ["bash", "fish", "zsh"]: + self.install_completion(f"wgcf.{shell}", shell)