Skip to content

Instantly share code, notes, and snippets.

@rbellamy
Last active March 4, 2017 17:00
Show Gist options
  • Save rbellamy/7f9e33619ff39047002cb63245bdd654 to your computer and use it in GitHub Desktop.
Save rbellamy/7f9e33619ff39047002cb63245bdd654 to your computer and use it in GitHub Desktop.
PKGBUILD for awless-git
pkgname=awless-git
pkgver=0.16.r12.g2604554
pkgrel=1
pkgdesc="A fast, powerful and easy-to-use command line interface (CLI) to manage Amazon Web Services."
_vendor="github.com/wallix/${pkgname/-git/}"
arch=('i686' 'x86_64')
url="https://${_vendor}"
license=('Apache')
depends=('glibc')
makedepends=('go' 'git')
provides=('awless')
conflicts=('awless')
source=("${pkgname}::git://github.com/wallix/${pkgname/-/.}")
sha256sums=('SKIP')
_vendorpath="gopath/src/$_vendor"
prepare() {
mkdir -p $_vendorpath
[[ -d $_vendorpath ]] && rm -fr $_vendorpath
mv -T $pkgname $_vendorpath
}
build() {
export GOPATH="$srcdir/gopath"
cd $_vendorpath
go build -o "bin/${pkgname/-git/}"
}
package() {
cd $_vendorpath
install -Dm755 "bin/${pkgname/-git/}" "$pkgdir/usr/bin/${pkgname/-git/}"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname/-git/}/LICENSE"
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment