%define debug %nil %define debug_package %nil %define commit 9054de25b48e29af9c6922449496250b57efb548 %define shortcommit %(c=%{commit}; echo ${c:0:7}) %define date 20200901 %define tfprovider decs %ifarch x86_64 amd64 %global goarch amd64 %else %global goarch 386 %endif Name: terraform-provider-%{tfprovider} Version: 1.0.2 Release: 1.rc.%{shortcommit} Summary: Terraform provider for Digital Energy Cloud Services (DECS) URL: https://github.com/rudecs/terraform-provider-decs Source0: %{url}/archive/rc-%{version}/%{name}-%{version}.tar.gz Source1: %{name}_fix.tar.gz License: ASL 2.0 Group: Development/Other BuildRequires: go >= 1.11 BuildRequires: git-core BuildRequires: upx %description Terraform provider for Digital Energy Cloud Services (DECS) %prep %setup -qn %{name}-rc-%{version} tar -xf %{SOURCE1} %build #go get github.com/hashicorp/terraform/plugin@v0.12.31 #go get github.com/hashicorp/terraform/terraform@v0.12.31 #go mod init github.com/rudecs/terraform-provider-decs #go mod tidy GO111MODULE=on go build upx %{name} %install install -Dm0755 %{name} %{buildroot}/%{_datadir}/terraform/plugins/tf.%{tfprovider}.online/mylocal/%{tfprovider}/%{version}/linux_%{goarch}/%{name} %files %doc README.md LICENSE %{_datadir}/terraform/plugins/tf.%{tfprovider}.online/mylocal/%{tfprovider}/%{version}/linux_%{goarch}/%{name}