packer/packer.spec

52 lines
1.6 KiB
RPMSpec
Raw Permalink Normal View History

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 <silvan.calarco@mambasoft.it>
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 <silvan.calarco@mambasoft.it> 1.2.5-1mamba
- package created using the webbuild interface