| 1 | # Contributor: Carlo Landmeter <[email protected]> |
| 2 | # Maintainer: |
| 3 | pkgname=gb |
| 4 | pkgver=0.4.4 |
| 5 | _errors_ver=0.8.0 |
| 6 | pkgrel=42 |
| 7 | pkgdesc="Project based build tool for Go" |
| 8 | options="!check" |
| 9 | url="https://github.com/constabulary/gb" |
| 10 | arch="all" |
| 11 | license="MIT" |
| 12 | makedepends="go" |
| 13 | source="gb-$pkgver.tar.gz::https://github.com/constabulary/gb/archive/v$pkgver.tar.gz |
| 14 | go-errors-$_errors_ver.tar.gz::https://github.com/pkg/errors/archive/v$_errors_ver.tar.gz |
| 15 | buildmode-pie.patch |
| 16 | " |
| 17 | builddir="$srcdir/src/github.com/constabulary/$pkgname" |
| 18 | |
| 19 | prepare() { |
| 20 | mkdir -p ${builddir%/*} |
| 21 | mv "$srcdir"/$pkgname-$pkgver "$builddir"/ |
| 22 | mkdir -p "$srcdir"/src/github.com/pkg |
| 23 | mv "$srcdir"/errors-$_errors_ver "$srcdir"/src/github.com/pkg/errors |
| 24 | default_prepare |
| 25 | } |
| 26 | |
| 27 | build() { |
| 28 | export GOPATH="$srcdir" |
| 29 | export GO111MODULE=off |
| 30 | |
| 31 | for bin in gb gb-vendor; do |
| 32 | cd "$builddir"/cmd/$bin && go build -v |
| 33 | done |
| 34 | } |
| 35 | |
| 36 | package() { |
| 37 | for bin in gb gb-vendor; do |
| 38 | install -Dm755 "$builddir"/cmd/$bin/$bin \ |
| 39 | "$pkgdir"/usr/bin/$bin |
| 40 | done |
| 41 | } |
| 42 | |
| 43 | sha512sums="d83dd4d80a1126708b0eaa4492eeac9ba772926fdb25a51d80c881db6c0bc6e5edae82f946fd61ae905f689290b4b031698d795006a62a2bcfada8beb535eac4 gb-0.4.4.tar.gz |
| 44 | 82055b10c02f13a8ce497388729568ddde7ae61e9fb2592b9acb11c61dfe94d5554432aee168e7c7adbd8345511c3e4ce0ba4c1b23cf253480e199a95316c443 go-errors-0.8.0.tar.gz |
| 45 | 38f753d328258d0e1c608aa99c31c080f2fe6a72a1710e78df15e8e47caa54f985b4d13af698c08eb10e0e7615d7848a709dcb7f5c9800ab80ccb34ce1b59a0b buildmode-pie.patch" |