makedeb


aws-cli 2.7.12-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.7.12
pkgrel=1
pkgdesc="The latest version of the AWS CLI."
arch=('x86_64')
license=('Apache-2.0')
depends=()
makedepends=('zip')
url="https://github.com/aws/aws-cli"
_filename="awscli-exe-linux-${arch}-${pkgver}.zip"

source=(
  https://awscli.amazonaws.com/awscli-exe-linux-${arch}-${pkgver}.zip
)
sha256sums=(
  b03e475a0889465bda250f620bec7854e19681a6443bad4f2257a11cc9638564
)


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"
}