Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user/stgit: new package #3469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions user/stgit-emacs
1 change: 1 addition & 0 deletions user/stgit-vim
78 changes: 78 additions & 0 deletions user/stgit/template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
pkgname = "stgit"
pkgver = "2.5.1"
pkgrel = 0
build_style = "cargo"
hostmakedepends = [
"asciidoc",
"cargo-auditable",
"perl",
"pkgconf",
"xmlto",
]
makedepends = [
"openssl-devel",
"rust-std",
]
pkgdesc = "Mange git commits as a stack of patches"
maintainer = "ttyyls <[email protected]>"
license = "GPL-2.0-only"
url = "https://stacked-git.github.io"
source = (
f"https://github.com/stacked-git/stgit/archive/refs/tags/v{pkgver}.tar.gz"
)
sha256 = "d871207dd8f90865e39b34259d457338e768efeec1165846b4a8e7759c818b74"
# generates completions with host bin
options = ["!cross"]


def post_build(self):
self.do("make", "-C", "Documentation", "man")
for shell in ["bash", "fish"]:
with open(self.cwd / f"stgit.{shell}", "w") as outf:
self.do(
f"target/{self.profile().triplet}/release/stg",
"completion",
shell,
stdout=outf,
)


def install(self):
self.install_bin(f"target/{self.profile().triplet}/release/stg")
self.do(
"make",
"-C",
"Documentation",
"install-man",
f"DESTDIR={self.chroot_destdir}",
"man1dir=/usr/share/man/man1",
)
for shell in ["bash", "fish"]:
self.install_completion(f"stgit.{shell}", shell, "stg")
self.install_completion("completion/stgit.zsh", "zsh", "stg")
self.install_file("contrib/stgit.el", "usr/share/emacs/site-lisp")
self.install_file(
"contrib/vim/ftdetect/stg.vim",
"usr/share/vim/vimfiles/syntax/ftdetect",
)
self.install_file(
"contrib/vim/syntax/*.vim",
"usr/share/vim/vimfiles/syntax",
glob=True,
)


@subpackage("stgit-emacs")
def _(self):
self.depends = [self.parent]
self.subdesc = "emacs stgit"
self.install_if = [self.parent, "emacs"]
return ["usr/share/emacs"]


@subpackage("stgit-vim")
def _(self):
self.depends = [self.parent]
self.subdesc = "vim stgit"
self.install_if = [self.parent, "vim"]
return ["usr/share/vim"]
Loading