void-packages/srcpkgs/packer/template

32 lines
801 B
Bash
Raw Normal View History

2015-08-17 14:32:26 +02:00
# Template file for 'packer'
pkgname=packer
2016-03-16 09:32:34 +01:00
version=0.10.0
2016-02-20 06:24:58 +01:00
revision=1
2015-08-17 14:32:26 +02:00
replaces="packer-bin>=0"
short_desc="Create identical multiplatform machine images from a single source"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
build_style=go
2016-02-19 21:51:20 +01:00
hostmakedepends="git-perl"
2015-08-17 14:32:26 +02:00
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"
2016-03-16 09:32:34 +01:00
checksum=cc7a5c857a3031c1587984528152f55b654ff33ef143d6fcebaea1b004f6e766
2015-08-17 14:32:26 +02:00
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
2015-08-17 14:32:26 +02:00
do
2016-03-08 20:10:59 +01:00
if [ "$(basename $line)" = packer ]; then
2015-08-17 14:32:26 +02:00
vbin $line
else
vbin $line packer-$(basename $line)
fi
done
}