[arch-commits] Commit in git-absorb/trunk (PKGBUILD)

Orhun Parmaksiz orhun at gemini.archlinux.org
Thu Dec 2 19:33:51 UTC 2021


    Date: Thursday, December 2, 2021 @ 19:33:51
  Author: orhun
Revision: 1062420

upgpkg: git-absorb 0.6.6-4: include shell completions (fixes FS#72857)

Modified:
  git-absorb/trunk/PKGBUILD

----------+
 PKGBUILD |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-02 19:27:15 UTC (rev 1062419)
+++ PKGBUILD	2021-12-02 19:33:51 UTC (rev 1062420)
@@ -3,7 +3,7 @@
 
 pkgname=git-absorb
 pkgver=0.6.6
-pkgrel=3
+pkgrel=4
 pkgdesc="git commit --fixup, but automatic"
 arch=('x86_64')
 url="https://github.com/tummychow/git-absorb"
@@ -16,11 +16,15 @@
 prepare() {
   cd "${pkgname}-${pkgver}"
   LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo fetch --locked
+  mkdir completions/
 }
 
 build() {
   cd "${pkgname}-${pkgver}"
   LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo build --release --frozen
+  "target/release/$pkgname" --gen-completions bash > "completions/$pkgname.bash" 
+  "target/release/$pkgname" --gen-completions fish > "completions/$pkgname.fish"
+  "target/release/$pkgname" --gen-completions zsh > "completions/_$pkgname"
 }
 
 check() {
@@ -34,6 +38,9 @@
   install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
   install -Dm 644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm 644 "Documentation/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  install -Dm 644 "completions/$pkgname.bash" "${pkgdir}/usr/share/bash-completion/completions/$pkgname"
+  install -Dm 644 "completions/$pkgname.fish" -t "${pkgdir}/usr/share/fish/vendor_completions.d"
+  install -Dm 644 "completions/_$pkgname" -t "${pkgdir}/usr/share/zsh/site-functions"
 }
 
 # vim: ts=2 sw=2 et:



More information about the arch-commits mailing list