terraform-provider-gitlab/terraform-provider-gitlab.spec
2024-12-20 13:39:42 +00:00

45 lines
954 B
RPMSpec

%define debug %nil
%define debug_package %nil
%define tfprovider gitlab
%ifarch x86_64 amd64
%global goarch amd64
%else
%global goarch 386
%endif
Name: terraform-provider-%{tfprovider}
Version: 17.7.0
Release: 1
Summary: Terraform gitlab provider
URL: https://gitlab.com/gitlab-org/%{name}
Source0: %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.gz
License: MPL 2.0
Group: Development/Other
BuildRequires: go >= 1.23.2
BuildRequires: git-core
BuildRequires: upx
BuildRequires: pkgconfig(openssl3.3)
%description
%{summary}
%prep
%setup -qn %{name}-v%{version}
%build
export GOPROXY=direct
go build --ldflags="-s -w"
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}