diff --git a/README.md b/README.md index a15b712..a714b86 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # packer +Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. + diff --git a/packer.spec b/packer.spec new file mode 100644 index 0000000..1242753 --- /dev/null +++ b/packer.spec @@ -0,0 +1,51 @@ +Name: packer +Version: 1.2.5 +Release: 1mamba +Summary: A tool for creating identical machine images for multiple platforms from a single source configuration +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://packer.io +## GITSOURCE https://github.com/hashicorp/packer.git v1.2.5 +Source: https://github.com/hashicorp/packer.git/v%{version}/packer-%{version}.tar.bz2 +License: MPL 2.0 +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRequires: go-pie +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. + +%debug_package + +%prep +%setup -q -c -a0 +mkdir -p src/github.com/hashicorp +mv %{name}-%{version} src/github.com/hashicorp/%{name} + +%build +export GOPATH=`pwd` +export CGO_ENABLED=0 +export PATH="$PATH:$GOPATH/bin" +sed -e '/VersionPrerelease = ""/ {N;N;N;d;}' -i src/github.com/hashicorp/%{name}/Makefile +cd src/github.com/hashicorp/%{name} +go-pie build -buildmode=exe -o packer-binary + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +cd src/github.com/hashicorp/%{name} +install -Dm755 packer-binary %{buildroot}%{_bindir}/packer + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/packer +%doc src/github.com/hashicorp/packer/LICENSE + +%changelog +* Mon Sep 10 2018 Silvan Calarco 1.2.5-1mamba +- package created using the webbuild interface