archrelease: copy trunk to community-any
[ArchLinux/community.git] / aws-vault / trunk / PKGBUILD
blobcfb0e2516a14acc4c997cf452ebaa823d30abac1
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 # Contributor: Carlo Cabanilla <carlo.cabanilla@gmail.com>
4 # Contributor: Christoph Gysin <christoph.gysin@gmail.com>
6 pkgname=aws-vault
7 pkgver=7.2.0
8 pkgrel=1
9 pkgdesc='Vault for securely storing and accessing AWS credentials in development environments'
10 url='https://github.com/99designs/aws-vault'
11 arch=('x86_64')
12 license=('MIT')
13 depends=('glibc')
14 makedepends=('go')
15 optdepends=(
16   'zenity: graphical prompt'
17   'kdialog: graphical prompt'
19 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
20 sha256sums=('3f2f1d0ec06eb0873f9b96b59dc70f9fcc832dc97b927af3dbab6cdc87477b0e')
21 b2sums=('88686d77e5624f5c9d6c62b661ad022088505b19904da664eb397fe42a78b46f92bf859ea311efc50865673d08f632a3a37d42dced9f0a52fad264da9b3f5cbf')
23 build() {
24   cd "${pkgname}-${pkgver}"
25   export CGO_CFLAGS="${CFLAGS}"
26   export CGO_CXXFLAGS="${CXXFLAGS}"
27   export CGO_CPPFLAGS="${CPPFLAGS}"
28   export CGO_LDFLAGS="${LDFLAGS}"
29   export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
30   go build -v \
31     -ldflags "-linkmode=external -extldflags '${LDFLAGS}' -X main.Version=v${pkgver}" .
34 check() {
35   cd "${pkgname}-${pkgver}"
36   go test ./...
39 package() {
40   cd "${pkgname}-${pkgver}"
41   install -Dm 755 ${pkgname} -t "${pkgdir}/usr/bin"
42   install -Dm 644 README.md USAGE.md -t "${pkgdir}/usr/share/doc/${pkgname}"
43   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
44   install -Dm 644 -p contrib/completions/bash/${pkgname}.bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
45   install -Dm 644 -p contrib/completions/zsh/${pkgname}.zsh "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
46   install -Dm 644 -p contrib/completions/fish/${pkgname}.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
49 # vim: ts=2 sw=2 et: