makedeb


aws-cli 2.11.4-1


The latest version of the AWS CLI.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for aws-cli.

# Maintainer: thesting <fxcw_vacilon@slmail.me>
# Changelog: https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst
pkgname=aws-cli
pkgver=2.11.4
pkgrel=1
pkgdesc="The latest version of the AWS CLI."
arch=('amd64')
license=('Apache-2.0')
depends=()
makedepends=('zip')
url="https://github.com/aws/aws-cli"
_filename="awscli-exe-linux-x86_64-${pkgver}.zip"

source=(
  https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${pkgver}.zip
)
sha512sums=(
  1298838899974bb9512c3a9e5783fab1c9bd8d9d49541e8d77859b648501b7be2fbc1656604f0f2366207faa937548831b0e1cf16c73054fab115078032885a8
)


package() {
  $srcdir/aws/install -i "$pkgdir/usr/share/aws-cli" -b "$pkgdir/usr/bin" >/dev/null

  # Install binary symlinks
  BIN_DIR="/usr/share/aws-cli/v2/$pkgver/bin"
  for i in $pkgdir/$BIN_DIR/*; do
    ln -sf "$BIN_DIR/$(basename $i)" "$pkgdir/usr/bin/"
  done
  
  # Fix symlink for current version
  rm "$pkgdir/usr/share/aws-cli/v2/current"
  ln -s "/usr/share/aws-cli/v2/$pkgver" "$pkgdir/usr/share/aws-cli/v2/current"
}