2 # - solve hacks better:
3 # - hack1: git rev-parse expects .git repo and aborts
4 # - hack2: go get ./... spews errors about "no install location for directory ... outside GOPATH" and aborts
5 # - hack3: scripts/build.sh does kill 0, which kills jobs and makes it abort with error, ignore errors
6 # - hack4: the same kill 0 kills make as well, use setsid to "fix"
7 # - building downloads go packages - not suitable for builders
10 %bcond_without tests # build without tests
12 Summary: Tool for creating identical machine images for multiple platforms from a single source configuration
17 Group: Applications/Emulators
18 Source0: https://github.com/mitchellh/packer/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 2e8fbcf12e4cd9416b7c1c2ea1d97c3a
21 URL: http://www.packer.io/
22 BuildRequires: golang >= 1.1
24 BuildRequires: mercurial
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Packer is lightweight, runs on every major operating system, and is
29 highly performant, creating machine images for multiple platforms in
30 parallel. Packer comes out of the box with support for creating AMIs
31 (EC2), VMware images, and VirtualBox images. Support for more
32 platforms can be added via plugins.
34 The images that Packer creates can easily be turned into Vagrant
42 # avoid interfering with builder env
43 #unset GIT_WORK_TREE GIT_DIR
45 export GOPATH=$(pwd)/GOPATH
46 export GOBIN=$GOPATH/bin
47 export PATH=$PATH:$GOBIN
52 %{?with_test:%{__make} test}
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{_bindir}
57 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
64 %doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE
65 %attr(755,root,root) %{_bindir}/packer
66 %attr(755,root,root) %{_bindir}/packer-builder-amazon-chroot
67 %attr(755,root,root) %{_bindir}/packer-builder-amazon-ebs
68 %attr(755,root,root) %{_bindir}/packer-builder-amazon-instance
69 %attr(755,root,root) %{_bindir}/packer-builder-digitalocean
70 %attr(755,root,root) %{_bindir}/packer-builder-openstack
71 %attr(755,root,root) %{_bindir}/packer-builder-virtualbox
72 %attr(755,root,root) %{_bindir}/packer-builder-vmware
73 %attr(755,root,root) %{_bindir}/packer-command-build
74 %attr(755,root,root) %{_bindir}/packer-command-fix
75 %attr(755,root,root) %{_bindir}/packer-command-inspect
76 %attr(755,root,root) %{_bindir}/packer-command-validate
77 %attr(755,root,root) %{_bindir}/packer-post-processor-vagrant
78 %attr(755,root,root) %{_bindir}/packer-provisioner-chef-solo
79 %attr(755,root,root) %{_bindir}/packer-provisioner-file
80 %attr(755,root,root) %{_bindir}/packer-provisioner-puppet-masterless
81 %attr(755,root,root) %{_bindir}/packer-provisioner-salt-masterless
82 %attr(755,root,root) %{_bindir}/packer-provisioner-shell