mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-31 13:32:10 +01:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
# Maintainer: Galen Abell <galen@galenabell.com>
|
|
# Contributor: Galen Abell <galen@galenabell.com>
|
|
pkgname=packer
|
|
pkgver=1.5.1
|
|
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="88b86ddd41003337ca839e79960362ad9a2e0e4c893cd565b81128c58e00d4325a4870c7bb8d391f1fc5c490dd6c6fe87e90e7b4dbcb0cf7fe4bd22a51024eff packer-1.5.1.tar.gz"
|