aboutsummaryrefslogtreecommitdiffstats
path: root/testing/drone-cli/APKBUILD
blob: eea9a0431249e1a20ff7971b5babb45f9d9ed20f (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=drone-cli
pkgver=1.0.6
pkgrel=0
pkgdesc="Drone CLI" 
url="https://github.com/drone/drone-cli"
arch="all"
license="Apache-2.0"
options="!check"
makedepends="go"
source="drone-cli-$pkgver.tar.gz::https://github.com/drone/drone-cli/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/drone/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	cd "$builddir"
	default_prepare
}

build() {
	cd "$builddir"
	export GOPATH="$srcdir"
	go build -ldflags "-X main.version=${pkgver}" -o bin/drone ./drone
}

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

sha512sums="cf4f78eb4d16cb52c81a049485b6341ee0b6b400f1219f232408dcb39f6b783f647d44f50cc0def9996787d06dc4c458f29d9bf8c44ba1f9b9e101104863374c  drone-cli-1.0.6.tar.gz"