aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorGalen Abell <galen@galenabell.com>2019-12-03 17:48:50 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-12-03 18:10:12 +0100
commit43ddeb8c4fb75f605b1edba557641078a998a52c (patch)
treebc072675857c779a88986b7ac99cfa9bca31c634 /testing
parentbd04d6830531942a4ed9ff1a9eca49f6c5f6e7a2 (diff)
downloadaports-43ddeb8c4fb75f605b1edba557641078a998a52c.tar.bz2
aports-43ddeb8c4fb75f605b1edba557641078a998a52c.tar.xz
testing/packer: new aport
https://www.packer.io/ Build Automated Machine Images testing/
Diffstat (limited to 'testing')
-rw-r--r--testing/packer/APKBUILD39
1 files changed, 39 insertions, 0 deletions
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 <galen@galenabell.com>
+# Contributor: Galen Abell <galen@galenabell.com>
+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"