aboutsummaryrefslogtreecommitdiffstats
path: root/community/packer/APKBUILD
blob: f6dd411487b0bb2cb1a21612b205d3dee085734a (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
# Maintainer: Galen Abell <galen@galenabell.com>
# Contributor: Galen Abell <galen@galenabell.com>
pkgname=packer
pkgver=1.7.8
pkgrel=1
pkgdesc="tool for creating machine images for multiple platforms"
url="https://www.packer.io/"
license="MPL-2.0"
arch="all"
makedepends="go"
options="net chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/packer/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir"

build() {
	export GOFLAGS="$GOFLAGS -trimpath"
	export GOLDFLAGS="-s -w -X main.GitCommit=v$pkgver"
	go build -v -o bin/$pkgname
}

check() {
	go list . | xargs -t -n4 go test -timeout=2m -parallel=4
	bin/$pkgname -v
}

package() {
	install -Dm755 bin/"$pkgname" -t "$pkgdir"/usr/bin/
}

sha512sums="
6ea9fbf0f45fad3387a0462b1b4f788e5d1c5bebfb9f7e1cc82726a97e4a42ce5397e829bcc0c3441e10c0230ab4cd1d749f8e9d4839307f97bd72e699db708b  packer-1.7.8.tar.gz
"