Subject: [PATCH] testing/packer: new aport

From: Galen Abell <[email-masked]>
Date: Tue, 3 Dec 2019 17:48:50 +0100

https://www.packer.io/
Build Automated Machine Images
testing/
---
 testing/packer/APKBUILD | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 testing/packer/APKBUILD

diff --git a/testing/packer/APKBUILD b/testing/packer/APKBUILD
new file mode 100644
index 0000000000..ff751eab2a
--- /dev/null
+++ b/testing/packer/APKBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Galen Abell <[email-masked]>
+# Contributor: Galen Abell <[email-masked]>
+pkgname=packer
+pkgver=1.4.5
+pkgrel=0
+pkgdesc="Build Automated Machine Images"
+url="https://www.packer.io/"
+arch="all !armhf !armv7"
+license="MPL-2.0"
+makedepends="go"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/packer/archive/v$pkgver.tar.gz"
+builddir="$srcdir/src/github.com/hashicorp/$pkgname"
+
+prepare() {
+	mkdir -p ${builddir%/*}
+	mv $srcdir/$pkgname-$pkgver "$builddir"/
+	default_prepare
+}
+
+build() {
+	GO111MODULE=off GOPATH="$srcdir" go build -v -o bin/$pkgname \
+		-ldflags "-X main.GitCommit=v$pkgver -X github.com/hashicorp/packer/version.Prerelease= -s -w"
+}
+
+check() {
+	GOPATH="$srcdir" go list -mod=vendor . | xargs -t -n4 go test -mod=vendor -timeout=2m -parallel=4
+	bin/$pkgname -v
+}
+
+package() {
+	install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+}
+
+cleanup_srcdir() {
+	go clean -modcache
+	default_cleanup_srcdir
+}
+
+sha512sums="b2a3ae27612c78fcfcb2ac655437faf2cff6e587fd10033b39ddaca8b92b634b93ecd0ae7e3ee43253ee716a2c0f7da532b3ae0ce33c59d1d3896f9187d9a657  packer-1.4.5.tar.gz"
-- 
2.24.0