Date: Wednesday, March 9, 2022 @ 08:38:13 Author: alerque Revision: 1145650
upgpkg: cocogitto 5.0.0-1 Modified: cocogitto/trunk/PKGBUILD ----------+ PKGBUILD | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-03-09 08:09:51 UTC (rev 1145649) +++ PKGBUILD 2022-03-09 08:38:13 UTC (rev 1145650) @@ -2,9 +2,10 @@ # Maintainer: Orhun Parmaksız <[email protected]> pkgname=cocogitto -pkgver=4.1.0 -pkgrel=2 -pkgdesc="Set of CLI tools for the conventional commit and semver specifications" +_bin=cog +pkgver=5.0.0 +pkgrel=1 +pkgdesc='Set of CLI tools for the conventional commit and semver specifications' arch=(x86_64) url="https://github.com/$pkgname/$pkgname" license=(MIT) @@ -16,35 +17,35 @@ makedepends=(cargo) _archive="$pkgname-$pkgver" source=("$url/archive/$pkgver/$_archive.tar.gz") -sha256sums=('0465267125058922462c197584007b6c92b08230acf21a5057faf5f4f5667d72') +sha256sums=('df37716965404aed1ed5265c015e28dbe57fec1e6ad8433bc6a9b676a4ee774d') prepare() { cd "$_archive" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" + mkdir completions } build() { cd "$_archive" cargo build --frozen --release + local compgen="target/release/$_bin generate-completions" + $compgen bash > "completions/$_bin" + $compgen fish > "completions/$_bin.fish" + $compgen zsh > "completions/_$_bin" } check() { cd "$_archive" - # Test suite is not atomic, relies on user environment such as git user configs - # cargo test --frozen + # Test suite is not atomic, relies on user environment such as git user configs + # cargo test --frozen } package() { cd "$_archive" - 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/$_bin" + install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" "completions/$_bin" + install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "completions/$_bin.fish" + install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "completions/_$_bin" install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE }
