# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=keybase-client
pkgver=1.0.46
_ver=${pkgver/_p/-}
pkgrel=0
pkgdesc="CLI client for keybase.io"
url="https://github.com/keybase/client"
arch="all"
license="BSD-3-Clause"
depends=""
depends_dev=""
makedepends="$depends_dev go"
install=""
subpackages=""
options="!strip"
source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname/-//}/archive/v${_ver}.tar.gz"

builddir="$srcdir/client-${_ver}"
build() {
	cd "$srcdir"
	export GOPATH="$PWD"
	export GO15VENDOREXPERIMENT=1

	mkdir -p src/github.com/keybase
	cp -r "$srcdir/client-${_ver}" src/github.com/keybase/client
	cd src/github.com/keybase/client/go/keybase
	go build -v -a -tags production -o "$srcdir/keybase"
}

package() {
	install -Dm755 "${srcdir}/keybase" "${pkgdir}/usr/bin/keybase"
}

sha512sums="35dbc18ae5d7efc6137e225e9257f3b897d381d621b6d7601b69250197f27704212e9ddfdb2a9d4181a668993d79431209ecd612d509caf3929857afb51885bd  keybase-client-1.0.46.tar.gz"
