From 4ab6864eb188f27e94b69dbf7baa0120f04f7ee8 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Mon, 17 Aug 2015 14:32:13 +0200 Subject: [PATCH 1/2] packer-bin: removed --- srcpkgs/packer-bin/template | 30 ------------------------------ srcpkgs/packer-bin/update | 2 -- 2 files changed, 32 deletions(-) delete mode 100644 srcpkgs/packer-bin/template delete mode 100644 srcpkgs/packer-bin/update diff --git a/srcpkgs/packer-bin/template b/srcpkgs/packer-bin/template deleted file mode 100644 index 6ae5fe8b4de..00000000000 --- a/srcpkgs/packer-bin/template +++ /dev/null @@ -1,30 +0,0 @@ -# Template file for 'packer-bin' -pkgname=packer-bin -version=0.7.5 -revision=3 -create_wrksrc=yes -only_for_archs="i686 x86_64" -hostmakedepends="unzip" -short_desc="Create identical multiplatform machine images from a single source" -maintainer="Andrea Brancaleoni " -license="MPL-2" -homepage="http://www.packer.io" -nocross=yes -provides="packer-${version}_${revision}" - -case "$XBPS_TARGET_MACHINE" in - x86_64) - distfiles="https://dl.bintray.com/mitchellh/packer/packer_${version}_linux_amd64.zip>${pkgname}-${version}-${XBPS_TARGET_MACHINE}.zip" - checksum="8fab291c8cc988bd0004195677924ab6846aee5800b6c8696d71d33456701ef6" - ;; - i686) - distfiles="https://dl.bintray.com/mitchellh/packer/packer_${version}_linux_386.zip>${pkgname}-${version}-${XBPS_TARGET_MACHINE}.zip" - checksum="6a6ee79d51909f04f734c15a0e12ebcaba3f2cf4d449906f6a186490774262f9" - ;; -esac - -do_install() { - for file in *; do - vbin $file - done -} diff --git a/srcpkgs/packer-bin/update b/srcpkgs/packer-bin/update deleted file mode 100644 index d5a66af207b..00000000000 --- a/srcpkgs/packer-bin/update +++ /dev/null @@ -1,2 +0,0 @@ -site="https://api.github.com/repos/mitchellh/packer/tags" -pattern='"name":\s*"[^\d]*\K([\d\.]+)(?=")' From 2845556923f25e92b17bbdbbe60d6d511757c669 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Mon, 17 Aug 2015 14:32:26 +0200 Subject: [PATCH 2/2] 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 +}