Accepting request 1175016 from systemsmanagement:opentofu

OBS-URL: https://build.opensuse.org/request/show/1175016
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opentofu?expand=0&rev=16
This commit is contained in:
Ana Guerrero 2024-05-20 16:12:39 +00:00 committed by Git OBS Bridge
commit 33d6c5b9e6
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 17 06:57:26 UTC 2024 - Christian Goll <cgoll@suse.com>
- added global bash completion
-------------------------------------------------------------------
Wed May 08 16:22:29 UTC 2024 - opensuse_buildservice@ojkastl.de

View File

@ -28,6 +28,7 @@ URL: https://github.com/opentofu/opentofu
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source99: opentofu-rpmlintrc
BuildRequires: bash-completion
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.21
# See: https://github.com/hashicorp/opentofu/issues/22807
@ -57,10 +58,15 @@ go build \
%install
# Install the binary.
install -D -m 0755 bin/%{executable_name} "%{buildroot}/%{_bindir}/%{executable_name}"
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
cat > %{buildroot}%{_datadir}/bash-completion/completions/%{executable_name} <<EOF
complete -C %{_bindir}/%{executable_name} %{executable_name}
EOF
%files
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/%{executable_name}
%{_datadir}/bash-completion/completions/%{executable_name}
%changelog