aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sos/APKBUILD
blob: 264ed23140f55fb4b96cfc71c61a3dae321d85c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=sos
pkgver=0.8
pkgrel=0
pkgdesc="Simple Object Storage"
url="https://github.com/skx/sos"
arch="all"
license="GPL-2.0"
options="!check" # has no check
makedepends="go dep"
source="sos-$pkgver.tar.gz::https://github.com/skx/sos/archive/release-$pkgver.tar.gz
	Gopkg.lock
	Gopkg.toml
	"
builddir="$srcdir/src/github.com/skx/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
    mv "$srcdir"/$pkgname-release-$pkgver "$builddir"/
	cd "$builddir"
	cp $srcdir/Gopkg.* "$builddir"/
	GOPATH="$srcdir" dep ensure
    default_prepare
}

build() {
	cd "$builddir"
	GOPATH="$srcdir" go build -v -x -ldflags="-X main.version=$pkgver" \
		-o ./bin/sos
}

package() {
	cd "$builddir"
	install -Dm755 bin/sos "$pkgdir"/usr/bin/sos
}

sha512sums="c2b69ec5d945725a4d3ae765622c97a3f5dfecf0550309593e33b68b842855746711f74254d8a70e0754ee66a6dd7a279f5ac414274697086e086ba78d2b9c83  sos-0.8.tar.gz
ab3cf64fb1c39aee91873b95e12daeecd8b8017c3524182289cc7eafa38b05c6e428e10f12da27abab2e0b25040a57ee9c2caa85f7dfa6584f6d899c74118965  Gopkg.lock
881455b622e905d00e11b8d888b565900c4de5377360fd6982e88b8833548b42480e9447f22da428ecb2c95784e624db376e08c163577c8996c5f43e6aa22aae  Gopkg.toml"