Skip to content

Instantly share code, notes, and snippets.

@hi-ogawa
Created November 21, 2022 00:14
Show Gist options
  • Save hi-ogawa/8469dd4618448e330cf5a02b95751439 to your computer and use it in GitHub Desktop.
Save hi-ogawa/8469dd4618448e330cf5a02b95751439 to your computer and use it in GitHub Desktop.
PKGBUILD aws-cli-v2-bin
# it seems aws-cli-v2-bin is deleted from aur. I extracted PKGBUILD from yay cache just in case.
# Maintainer: Steve Engledow <[email protected]>
pkgname=aws-cli-v2-bin
pkgver=2.8.3
pkgrel=1
pkgdesc='Universal Command Line Interface for Amazon Web Services version 2'
arch=('aarch64' 'x86_64')
url='https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html'
license=('Apache')
provides=('aws-cli' 'aws-cli-v2')
conflicts=('aws-cli' 'aws-cli-v2')
makedepends=('unzip')
depends=('less')
source_aarch64=("https://awscli.amazonaws.com/awscli-exe-linux-aarch64-$pkgver.zip")
source_x86_64=("https://awscli.amazonaws.com/awscli-exe-linux-x86_64-$pkgver.zip")
sha256sums_aarch64=('07d432065bac792c1f8fc9cd652b68943c5288bd37f4f6d7eea15323a7c35169')
sha256sums_x86_64=('471a40dbcb97a061c07095576fee3f9e89ae74d8b9d4d671fa1145539542f6d2')
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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment