summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3542d47747e7473a7123a4f4d1bc4d0f7ddceb62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: German Lashevich <german.lashevich@gmail.com>
#
# Source: https://github.com/zebradil/aur
#
# shellcheck disable=SC2034,SC2154
pkgname=imgpkg-bin
pkgver=0.42.0
pkgrel=1
pkgdesc='Store application configuration files in Docker/OCI registries'
url='https://carvel.dev/imgpkg'
arch=(x86_64 aarch64)
license=(apache-2.0)
install=''
provides=(imgpkg)
source_x86_64=(imgpkg-v0.42.0::https://github.com/carvel-dev/imgpkg/releases/download/v0.42.0/imgpkg-linux-amd64)
source_aarch64=(imgpkg-v0.42.0::https://github.com/carvel-dev/imgpkg/releases/download/v0.42.0/imgpkg-linux-arm64)
sha256sums_x86_64=(0bb6235af28abafc3458e30fbbd49e040aaa2189c4c39212a3c7a5a57ea83754)
sha256sums_aarch64=(fc7ad7465730297085e4c7deefc47e2e56713be957971935008460a9bc709a0a)
package () 
{ 
    set -eo pipefail;
    BIN_SRC="${srcdir}/${_z_binname}-v${pkgver}";
    BIN_DST="${pkgdir}/usr/bin/${_z_binname}";
    install -Dm 755 "$BIN_SRC" "$BIN_DST";
    if [[ "$_z_with_completion" == "true" ]]; then
        mkdir -p "$pkgdir/usr/share/bash-completion/completions/";
        mkdir -p "$pkgdir/usr/share/zsh/site-functions/";
        mkdir -p "$pkgdir/usr/share/fish/vendor_completions.d/";
        "$BIN_DST" completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$_z_binname";
        "$BIN_DST" completion fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/$_z_binname.fish";
        "$BIN_DST" completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$_z_binname";
    fi
}


# Custom variables

_z_binname="imgpkg"
_z_with_completion="true"