summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60c29469e81da3b1f42c81ed69fee7bca2d0f414 (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
40
41
42
43
44
45
46
47
48
# $Id$
# Maintainer: Bastien Traverse <firstname at lastname dot email>
# Contributor: masterme120
# Contributor: runical
# Contributor: oozyslug <oozyslug at gmail dot com>
# Submitter: Bastien Traverse <firstname at lastname dot email>

pkgname=yay-bin
pkgver=1.70
pkgrel=1
pkgdesc="Yet another yogurt. Pacman wrapper with AUR support written in go. Pre-compiled."
arch=('x86_64')
url="https://github.com/Jguer/yay"
license=('GPL')
depends=(
  'sudo'
)
provides=('yay')
conflicts=('yay')

source_x86_64=("https://github.com/Jguer/yay/releases/download/v${pkgver}/${pkgname/-bin}_${pkgver}_amd64.tar.gz")
md5sums_x86_64=('0025a05bf1eedf22ab05e752eefdec8f')

case "$CARCH" in
  arm*) _pkgarch="arm"
	;;
  i686) _pkgarch="386"
	;;
  x86_64) _pkgarch="amd64"
	;;
esac

package() {
  install -Dm755 "${srcdir}/${pkgname/-bin}_${pkgver}_${_pkgarch}/${pkgname/-bin}" "${pkgdir}/usr/bin/${pkgname/-bin}"
  mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
  install -Dm644 "${srcdir}/${pkgname/-bin}_${pkgver}_${_pkgarch}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname/-bin}/LICENSE"

  # Shell autocompletion script
  mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
  install -Dm644 "${srcdir}/${pkgname/-bin}_${pkgver}_${_pkgarch}/bash-completion" "${pkgdir}/usr/share/bash-completion/completions/yay"

  mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
  install -Dm644 "${srcdir}/${pkgname/-bin}_${pkgver}_${_pkgarch}/zsh-completion" "${pkgdir}/usr/share/zsh/site-functions/_yay"

  mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
  install -Dm644 "${srcdir}/${pkgname/-bin}_${pkgver}_${_pkgarch}/yay.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/yay.fish"

}