Date: Saturday, March 18, 2023 @ 18:56:46
Author: alerque
Revision: 1423023
archrelease: copy trunk to community-staging-x86_64
Added:
cocogitto/repos/community-staging-x86_64/
cocogitto/repos/community-staging-x86_64/PKGBUILD
(from rev 1423022, cocogitto/trunk/PKGBUILD)
----------+
PKGBUILD | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
Copied: cocogitto/repos/community-staging-x86_64/PKGBUILD (from rev 1423022,
cocogitto/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-03-18 18:56:46 UTC (rev 1423023)
@@ -0,0 +1,59 @@
+# Maintainer: Caleb Maclennan <[email protected]
+# Maintainer: Orhun Parmaksız <[email protected]>
+
+pkgname=cocogitto
+_bin=cog
+pkgver=5.3.1
+pkgrel=2
+pkgdesc='Set of CLI tools for the conventional commit and semver
specifications'
+arch=(x86_64)
+url="https://github.com/$pkgname/$pkgname"
+license=(MIT)
+depends=(git
+ gcc-libs
+ libgit2.so
+ zlib)
+makedepends=(cargo)
+_archive="$pkgname-$pkgver"
+source=("$url/archive/$pkgver/$_archive.tar.gz")
+sha256sums=('ac6847ce55ba284184d0792afb53c6579da415600bc1b01c180dd87ad34597d0')
+
+prepare() {
+ cd "$_archive"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+ mkdir {completions,man}
+}
+
+build() {
+ cd "$_archive"
+ CFLAGS+=" -ffat-lto-objects"
+ cargo build --frozen --release
+ local compgen="target/release/$_bin generate-completions"
+ $compgen bash > "completions/$_bin"
+ $compgen fish > "completions/$_bin.fish"
+ $compgen zsh > "completions/_$_bin"
+ local mangen="target/release/$_bin generate-manpage"
+ $mangen cog > "man/$_bin.1"
+ for cmd in 'check' 'commit' 'edit' 'log' 'verify' \
+ 'changelog' 'bump' 'init' 'install-hook' \
+ 'generate-completions'; do
+ $mangen $cmd > "man/$_bin-$cmd.1"
+ done
+}
+
+check() {
+ cd "$_archive"
+ # Test suite is not atomic, relies on user environment such as git user
configs
+ # cargo test --frozen
+}
+
+package() {
+ cd "$_archive"
+ 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
+ find man/ -type f -exec install -Dm0644 -t "$pkgdir/usr/share/man/man1"
{} \;
+}