From 2845556923f25e92b17bbdbbe60d6d511757c669 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Mon, 17 Aug 2015 14:32:26 +0200 Subject: [PATCH] New package: packer-0.8.5 --- srcpkgs/packer/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/packer/template diff --git a/srcpkgs/packer/template b/srcpkgs/packer/template new file mode 100644 index 00000000000..f3e8e8231e7 --- /dev/null +++ b/srcpkgs/packer/template @@ -0,0 +1,31 @@ +# Template file for 'packer' +pkgname=packer +version=0.8.5 +revision=1 +replaces="packer-bin>=0" +short_desc="Create identical multiplatform machine images from a single source" +maintainer="Andrea Brancaleoni " +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=7bf8946d9a16be81dbdfe12c2f3ff2c714c9c551a9e9d45d1c25ccb37ec40bb6 + +post_build() { + for F in $(find -type f -name main.go); do + go get -x $go_import_path/${F%/*} + done +} + +do_install() { + find "${GOBIN}" -type f -executable | while read line + do + if [[ $(basename $line) == packer ]]; then + vbin $line + else + vbin $line packer-$(basename $line) + fi + done +}