void-packages/srcpkgs/packer/template
2016-05-09 13:59:49 +02:00

31 lines
801 B
Bash

# Template file for 'packer'
pkgname=packer
version=0.10.1
revision=1
replaces="packer-bin>=0"
short_desc="Create identical multiplatform machine images from a single source"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
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=6a31c8c74b2370a748e3117db70e491a96fb86f1fbee9fa128d3f73c08230279
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
}