From 4c9362254d4c9aafa73bc4b27cead178110a5160 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Thu, 24 Nov 2022 04:02:42 +0300
Subject: ouch: Update to 0.4.0

---
 PKGBUILD | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

(limited to 'PKGBUILD')

diff --git a/PKGBUILD b/PKGBUILD
index e83ee41..66ff64c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
 # Maintainer: Yigit Sever <yigit at yigitsever dot com>
 
 pkgname=ouch
-pkgver=0.3.1
-pkgrel=4
+pkgver=0.4.0
+pkgrel=1
 pkgdesc="Painless compression and decompression in the terminal"
 arch=('x86_64')
 url="https://github.com/ouch-org/ouch"
@@ -10,7 +10,7 @@ license=('MIT')
 makedepends=('cargo')
 conflicts=(${pkgname}-git ${pkgname}-bin)
 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
-sha256sums=('269abaf5ac2f80da3796dbf5e73419c1b64104d1295f3ff57965141f079e6f6d')
+sha256sums=('3e126f00e1ad82ef4abfd28f86dac53b366a29de6a70359e734ecc8748f580fc')
 
 prepare() {
   cd "$srcdir/$pkgname-$pkgver"
@@ -21,7 +21,7 @@ build() {
   cd "$srcdir/$pkgname-$pkgver"
   export RUSTUP_TOOLCHAIN=stable
   export CARGO_TARGET_DIR=target
-  GEN_COMPLETIONS=1 cargo build --frozen --release --all-features
+  GEN_COMPLETIONS=1 OUCH_ARTIFACTS_FOLDER=artifacts cargo build --frozen --release --all-features
 }
 
 check() {
@@ -36,10 +36,16 @@ package() {
   install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 
-  cd target/release/build/ouch-*/out/completions
-  sed -i "s/':output -- The resulting file. It's extensions can be used to specify the compression formats:_files'/\":output -- The resulting file. It's extensions can be used to specify the compression formats:_files\"/" _ouch
+  cd "$srcdir/$pkgname-$pkgver/artifacts"
 
-  install -Dm0644 ${pkgname}.bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
-  install -Dm0644 ${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
-  install -Dm0644 _${pkgname} "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
+  # install manpages
+  install -Dm0644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1"
+  install -Dm0644 "${pkgname}-compress.1" -t "${pkgdir}/usr/share/man/man1"
+  install -Dm0644 "${pkgname}-decompress.1" -t "${pkgdir}/usr/share/man/man1"
+  install -Dm0644 "${pkgname}-list.1" -t "${pkgdir}/usr/share/man/man1"
+
+  # install shell completions
+  install -Dm0644 "${pkgname}.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
+  install -Dm0644 "${pkgname}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
+  install -Dm0644 "_${pkgname}" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
 }
-- 
cgit v1.2.3-70-g09d2