diff options
author | Orhun Parmaksız | 2023-12-01 14:16:04 +0300 |
---|---|---|
committer | Orhun Parmaksız | 2023-12-01 14:16:04 +0300 |
commit | 40da130b135a608917792ca6e2a9ee32e850be3f (patch) | |
tree | 50277bb8e9d3f032c2527ea5ae485051f077ab85 | |
parent | 1fa9a8e8bd3bfbe56bb8aa044a20ca16b61d2f67 (diff) | |
download | aur-40da130b135a608917792ca6e2a9ee32e850be3f.tar.gz |
upgpkg: cocogitto-git 6.0.1.r0.gf818bf2-1
upstream release
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 24 |
2 files changed, 15 insertions, 11 deletions
@@ -1,6 +1,6 @@ pkgbase = cocogitto-git pkgdesc = Set of CLI tools for the conventional commit and semver specifications (git) - pkgver = 4.1.0.r2.gcd847de + pkgver = 6.0.1.r0.gf818bf2 pkgrel = 1 url = https://github.com/cocogitto/cocogitto arch = x86_64 @@ -3,7 +3,8 @@ # https://github.com/orhun/pkgbuilds pkgname=cocogitto-git -pkgver=4.1.0.r2.gcd847de +_pkgname=cog +pkgver=6.0.1.r0.gf818bf2 pkgrel=1 pkgdesc="Set of CLI tools for the conventional commit and semver specifications (git)" arch=('x86_64') @@ -24,11 +25,18 @@ pkgver() { prepare() { cd "${pkgname%-git}" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" + mkdir {completions,man} } build() { cd "${pkgname%-git}" cargo build --frozen --release + local compgen="target/release/$_pkgname generate-completions" + local mangen="target/release/$_pkgname generate-manpages" + $compgen bash > "completions/$_pkgname" + $compgen fish > "completions/$_pkgname.fish" + $compgen zsh > "completions/_$_pkgname" + $mangen man/ } check() { @@ -39,15 +47,11 @@ check() { package() { cd "${pkgname%-git}" - for bin in coco cog; do - local target="target/release/$bin" - install -Dm0755 -t "$pkgdir/usr/bin/" "$target" - local gen="$target " - [[ $bin == coco ]] && gen+='--completion' || gen+='generate-completions' - $gen bash | install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$bin" - $gen fish | install -Dm0644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/$bin.fish" - $gen zsh | install -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$bin" - done + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname" + install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" "completions/$_pkgname" + install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "completions/$_pkgname.fish" + install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "completions/_$_pkgname" install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE + install -Dm0644 -t "$pkgdir/usr/share/man/man1" man/*.1 } |