# This file was generated by GoReleaser. DO NOT EDIT.
# Maintainer: Ciclano <ciclano@example.com>
# Maintainer: Cicrano <cicrano@example.com>
# Contributor: Fulano <fulano@example.com>
# Contributor: Beltrano <beltrano@example.com>

pkgname='test-bin'
pkgver=0.1.3
pkgrel=1
pkgdesc='Some desc'
url='https://example.com'
arch=('x86_64' 'i686' 'aarch64' 'armv6h' 'armv7h')
license=('MIT')
provides=('test')
conflicts=('nope')
depends=('nope')
optdepends=('nfpm')
backup=('/etc/mypkg.conf' '/var/share/mypkg')
install=test.install

source_x86_64=("${pkgname}_${pkgver}_x86_64.tar.gz::https://github.com/caarlos0/test/releases/download/v${pkgver}/test_Linux_x86_64.tar.gz")
sha256sums_x86_64=('1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67')

source_armv6h=("${pkgname}_${pkgver}_armv6h.tar.gz::https://github.com/caarlos0/test/releases/download/v${pkgver}/test_Linux_Arm6.tar.gz")
sha256sums_armv6h=('1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67')

source_aarch64=("${pkgname}_${pkgver}_aarch64.tar.gz::https://github.com/caarlos0/test/releases/download/v${pkgver}/test_Linux_Arm64.tar.gz")
sha256sums_aarch64=('1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67')

source_i686=("${pkgname}_${pkgver}_i686.tar.gz::https://github.com/caarlos0/test/releases/download/v${pkgver}/test_Linux_386.tar.gz")
sha256sums_i686=('1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67')

source_armv7h=("${pkgname}_${pkgver}_armv7h.tar.gz::https://github.com/caarlos0/test/releases/download/v${pkgver}/test_Linux_arm7.tar.gz")
sha256sums_armv7h=('1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67')

package() {
  # bin
  install -Dm755 "./goreleaser" "${pkgdir}/usr/bin/goreleaser"

  # license
  install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/goreleaser/LICENSE"

  # completions
  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/"
  install -Dm644 "./completions/goreleaser.bash" "${pkgdir}/usr/share/bash-completion/completions/goreleaser"
  install -Dm644 "./completions/goreleaser.zsh" "${pkgdir}/usr/share/zsh/site-functions/_goreleaser"
  install -Dm644 "./completions/goreleaser.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/goreleaser.fish"

  # man pages
  install -Dm644 "./manpages/goreleaser.1.gz" "${pkgdir}/usr/share/man/man1/goreleaser.1.gz"
}
