terraform-provider-decs/terraform-provider-decs.spec

57 lines
1.4 KiB
RPMSpec
Raw Permalink Normal View History

2021-09-20 23:39:25 +03:00
%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
2025-02-12 11:24:17 +00:00
export GOPROXY=https://proxy.golang.org,direct
export GO111MODULE=on
2021-09-20 23:39:25 +03:00
2025-02-12 11:24:17 +00:00
go build
2021-09-20 23:39:25 +03:00
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}