Skip to content

Commit 719d5c4

Browse files
committed
packer: Initial add of package
Signed-off-by: Jimmy Tang <jcftang@gmail.com>
1 parent 21d1966 commit 719d5c4

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

pkgs/gox.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
extends: [base_package]
2+
3+
dependencies:
4+
build: [golang, {{build_with}}]
5+
6+
defaults:
7+
relocatable: false
8+
9+
sources:
10+
- key: git:e8e6fd4fe12510cc46893dff18c5188a6a6dc549
11+
url: https://github.com/mitchellh/gox.git
12+
13+
build_stages:
14+
- name: make-install
15+
handler: bash
16+
bash: |
17+
export GOROOT=${GOLANG_DIR}/go
18+
export GOPATH=${ARTIFACT}/go-gox
19+
export GOBIN=${ARTIFACT}/bin
20+
mkdir -p $GOBIN $GOPATH
21+
mkdir -p ${GOPATH}/src/github.com/mitchellh
22+
cp -a ${BUILD} ${GOPATH}/src/github.com/mitchellh/gox
23+
cd ${GOPATH}/src/github.com/mitchellh/gox
24+
go get -v
25+
26+
when_build_dependency:
27+
- prepend_path: PATH
28+
value: '${ARTIFACT}/bin'

pkgs/packer.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
extends: [base_package]
2+
3+
dependencies:
4+
build: [golang, gox, {{build_with}}]
5+
6+
defaults:
7+
relocatable: false
8+
9+
sources:
10+
- key: git:f1970370ef337a6361a8a39bb4b17ddf625e4378
11+
url: https://github.com/mitchellh/packer.git
12+
13+
build_stages:
14+
- name: make-install
15+
handler: bash
16+
bash: |
17+
export GOROOT=${GOLANG_DIR}/go
18+
export GOPATH=${ARTIFACT}/go-packer
19+
export GOBIN=${ARTIFACT}/bin
20+
mkdir -p $GOBIN $GOPATH
21+
mkdir -p ${GOPATH}/src/github.com/mitchellh
22+
cp -a ${BUILD} ${GOPATH}/src/github.com/mitchellh/packer
23+
cd ${GOPATH}/src/github.com/mitchellh/packer
24+
make updatedeps
25+
unset GOBIN
26+
make dev
27+
mv ${GOPATH}/bin/* ${ARTIFACT}/bin/

0 commit comments

Comments
 (0)