]>
Commit | Line | Data |
---|---|---|
fcb3dbe8 ER |
1 | Summary: Tool for creating identical machine images for multiple platforms from a single source configuration |
2 | Name: packer | |
19fd55a1 | 3 | Version: 1.5.4 |
4 | Release: 1 | |
fcb3dbe8 ER |
5 | License: MPL 2.0 |
6 | Group: Applications/Emulators | |
19fd55a1 | 7 | Source0: https://github.com/hashicorp/packer/archive/v%{version}.tar.gz |
8 | # Source0-md5: 8c11adb7aa529793675a075dc9db40b0 | |
fcb3dbe8 | 9 | URL: http://www.packer.io/ |
fcb3dbe8 | 10 | BuildRequires: bash |
19fd55a1 | 11 | BuildRequires: golang >= 1.13 |
fcb3dbe8 ER |
12 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
13 | ||
19fd55a1 | 14 | %define _enable_debug_packages 0 |
15 | %define gobuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x | |
fcb3dbe8 | 16 | |
19fd55a1 | 17 | %description |
18 | Packer is an open source tool for creating identical machine images | |
19 | for multiple platforms from a single source configuration. Packer is | |
20 | lightweight, runs on every major operating system, and is highly | |
21 | performant, creating machine images for multiple platforms in | |
22 | parallel. Packer does not replace configuration management like Chef | |
23 | or Puppet. In fact, when building images, Packer is able to use tools | |
24 | like Chef or Puppet to install software onto the image. | |
25 | ||
26 | A machine image is a single static unit that contains a pre-configured | |
27 | operating system and installed software which is used to quickly | |
28 | create new running machines. Machine image formats change for each | |
29 | platform. Some examples include AMIs for EC2, VMDK/VMX files for | |
30 | VMware, OVF exports for VirtualBox, etc. | |
fcb3dbe8 ER |
31 | |
32 | %prep | |
33 | %setup -q | |
fcb3dbe8 ER |
34 | |
35 | %build | |
19fd55a1 | 36 | %gobuild -mod=vendor -o %{name}-binary |
fcb3dbe8 ER |
37 | |
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT%{_bindir} | |
19fd55a1 | 41 | cp -a %{name}-binary $RPM_BUILD_ROOT%{_bindir}/%{name} |
fcb3dbe8 ER |
42 | |
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %files | |
47 | %defattr(644,root,root,755) | |
19fd55a1 | 48 | %doc README.md CHANGELOG.md LICENSE |
fcb3dbe8 | 49 | %attr(755,root,root) %{_bindir}/packer |