diff options
author | Yigit Sever | 2021-11-03 12:35:57 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-03 12:35:57 +0300 |
commit | bdceec7ad1c44b54291293d43207e05fd96f138b (patch) | |
tree | b08c2bb1c253f0c5293d0f81549ce5c9cdb5c74a | |
parent | 7450e98a989ee6aef03a84402d5bb36c6c3a0f5e (diff) | |
download | aur-bdceec7ad1c44b54291293d43207e05fd96f138b.tar.gz |
Run tests and install completions
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 25 |
2 files changed, 20 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = ouch-git pkgdesc = Painless compression and decompression in the terminal pkgver = r385.a1c4f03 - pkgrel = 1 + pkgrel = 2 url = https://github.com/ouch-org/ouch/ arch = x86_64 license = MIT @@ -3,7 +3,7 @@ pkgname=ouch-git _pkgname=${pkgname%-git} pkgver=r385.a1c4f03 -pkgrel=1 +pkgrel=2 pkgdesc="Painless compression and decompression in the terminal" arch=('x86_64') url="https://github.com/ouch-org/ouch/" @@ -15,23 +15,36 @@ source=("${_pkgname}::git+${url}") sha256sums=('SKIP') pkgver() { - cd "$srcdir/${_pkgname}" + cd "$srcdir/${_pkgname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/${_pkgname}" + cd "$srcdir/${_pkgname}" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { - cd "$srcdir/${_pkgname}" + cd "$srcdir/${_pkgname}" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target - cargo build --frozen --release --all-features + GEN_COMPLETIONS=1 cargo build --frozen --release --all-features +} + +check() { + cd "$srcdir/${_pkgname}" + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features } package() { - cd "$srcdir/${_pkgname}" + cd "$srcdir/${_pkgname}" install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname}" + + 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 + + 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}" } |