# Maintainer: Valery Kartel # Contributor: Valery Kartel pkgname=awscli _pkgname=aws-cli pkgver=1.10.12 pkgrel=0 pkgdesc="Universal Command Line Interface for Amazon Web Services" url="https://github.com/aws/aws-cli" arch="noarch" license="apache2" depends="python py-botocore py-jmespath py-s3transfer" depends_dev= makedepends="python2-dev py-setuptools" install= subpackages="$pkgname-zsh-completion:zshcomp $pkgname-bash-completion:bashcomp" source="$_pkgname-$pkgver.tar.gz::https://github.com/aws/$_pkgname/archive/$pkgver.tar.gz" _builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$_builddir" python setup.py build || return 1 } package() { cd "$_builddir" python setup.py install --prefix=/usr --root="$pkgdir" || return 1 rm "$pkgdir"/usr/bin/aws.cmd } bashcomp() { depends= pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions mv "$pkgdir"/usr/bin/aws_bash_completer \ "$subpkgdir"/usr/share/bash-completion/completions/ } zshcomp() { depends= pkgdesc="Zsh completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" mkdir -p "$subpkgdir"/usr/share/zsh/site-functions mv "$pkgdir"/usr/bin/aws_zsh_completer.sh \ "$subpkgdir"/usr/share/zsh/site-functions/ } md5sums="d78effb794f6efee51a6ff465e2ec987 aws-cli-1.10.12.tar.gz" sha256sums="b1eaab59898b366f9fc72c18a741945bb1adf9275e05f940c83f99b3548021cc aws-cli-1.10.12.tar.gz" sha512sums="ae3f60eeba56b1ae1bb2c9315478daadd2ddcb86594aeec5da0a231c5acfcff3524d628d5865ed41cab7e3457a567450ede95314336c5b87dc95fb00b76fdb2f aws-cli-1.10.12.tar.gz"