void-packages/srcpkgs/packer/template
2017-04-07 19:10:22 +00:00

32 lines
797 B
Bash

# Template file for 'packer'
pkgname=packer
version=1.0.0
revision=2
replaces="packer-bin>=0"
short_desc="Create identical multiplatform machine images from a single source"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
build_style=go
hostmakedepends="git-perl"
license="MPL-2"
homepage="http://www.packer.io"
go_import_path="github.com/mitchellh/packer"
distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
checksum=6458f8f20333ff202cb3ab183867ad08a6cc49479edf48da9e3144c7e9f71dc6
post_build() {
for F in $(find -type f -name main.go); do
go get -x $go_import_path/${F%/*}
done
}
do_install() {
find "${GOPATH}/bin" -type f -executable | while read line
do
if [ "$(basename $line)" = packer ]; then
vbin $line
else
vbin $line packer-$(basename $line)
fi
done
}