mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-28 03:51:35 +01:00
39 lines
943 B
Plaintext
39 lines
943 B
Plaintext
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
|
|
pkgname=drone-cli
|
|
pkgver=1.2.4
|
|
pkgrel=0
|
|
pkgdesc="Drone CLI"
|
|
url="https://github.com/drone/drone-cli"
|
|
license="Apache-2.0"
|
|
arch="all"
|
|
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"/
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
export GOPATH="$srcdir"
|
|
go build -ldflags "-X main.version=$pkgver" -o bin/drone ./drone
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$builddir"/bin/drone "$pkgdir"/usr/bin/drone
|
|
}
|
|
|
|
cleanup_srcdir() {
|
|
go clean -modcache
|
|
default_cleanup_srcdir
|
|
}
|
|
|
|
sha512sums="74b8aa823079eb794e8dbc0b6cb8c4ae330b01b078615d6c424730651443be65ff7ec665e44678afa8a9c906ae8e6c486accf26555d78653bd61a549534f80d8 drone-cli-1.2.4.tar.gz"
|