2bb87e4e07
Go 1.5 doesn't permit our use of GOBIN anymore, breaking cross-compilation (for details, see https://github.com/golang/go/issues/9769) In retrospect, I'm not sure why we set GOBIN in the first place; GOPATH/bin should suffice. Closes #2337
31 lines
796 B
Bash
31 lines
796 B
Bash
# Template file for 'packer'
|
|
pkgname=packer
|
|
version=0.8.6
|
|
revision=3
|
|
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"
|
|
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=3d2e4d291a746f8f0aa23f6b5b5b0a6ef7b040e765d856a12f5f125ede8ea425
|
|
|
|
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
|
|
}
|