# Contributor: Carlo Landmeter # Maintainer: pkgname=gb pkgver=0.4.4 _errors_ver=0.8.0 pkgrel=0 pkgdesc="Project based build tool for Go" url="https://getgb.io/" arch="all" license="MIT" depends="" makedepends="go" install="" subpackages="" source="gb-$pkgver.tar.gz::https://github.com/constabulary/gb/archive/v$pkgver.tar.gz go-errors-$_errors_ver.tar.gz::https://github.com/pkg/errors/archive/v$_errors_ver.tar.gz buildmode-pie.patch " builddir="$srcdir/src/github.com/constabulary/$pkgname" prepare() { mkdir -p ${builddir%/*} mv "$srcdir"/$pkgname-$pkgver "$builddir"/ mkdir -p "$srcdir"/src/github.com/pkg mv "$srcdir"/errors-$_errors_ver "$srcdir"/src/github.com/pkg/errors cd "$builddir" default_prepare } build() { cd "$builddir" export GOPATH="$srcdir" for bin in gb gb-vendor; do cd "$builddir"/cmd/$bin && go build -v done } check() { msg "Running tests..." for bin in gb gb-vendor; do "$builddir"/cmd/$bin/$bin help > /dev/null done } package() { cd "$builddir" for bin in gb gb-vendor; do install -Dm755 "$builddir"/cmd/$bin/$bin \ "$pkgdir"/usr/bin/$bin done } sha512sums="d83dd4d80a1126708b0eaa4492eeac9ba772926fdb25a51d80c881db6c0bc6e5edae82f946fd61ae905f689290b4b031698d795006a62a2bcfada8beb535eac4 gb-0.4.4.tar.gz 82055b10c02f13a8ce497388729568ddde7ae61e9fb2592b9acb11c61dfe94d5554432aee168e7c7adbd8345511c3e4ce0ba4c1b23cf253480e199a95316c443 go-errors-0.8.0.tar.gz 38f753d328258d0e1c608aa99c31c080f2fe6a72a1710e78df15e8e47caa54f985b4d13af698c08eb10e0e7615d7848a709dcb7f5c9800ab80ccb34ce1b59a0b buildmode-pie.patch"