#debuginfo not supported with Go %global debug_package %{nil} # modifying the Go binaries breaks the DWARF debugging %global __os_install_post %{_rpmconfigdir}/brp-compress %global import_path github.com/openshift/cloud-credential-operator %global golang_version 1.19 %{!?commit:%global commit 7f2d02b853be787815e2109d8b1a62736c9e2bf7} %global shortcommit %(c=%{commit};echo ${c:0:7}) %global os_git_vars OS_GIT_VERSION='%{version}' OS_GIT_COMMIT='%{shortcommit}' OS_GIT_TREE_STATE='clean' Name: openshift-cloud-credential-tool Version: 4.13.0 Release: 1%{dist} Summary: OpenShift cloud credential provisioning tool License: ASL 2.0 URL: https://%{import_path} Source0: https://%{import_path}/archive/%{commit}/cloud-credential-operator-%{commit}.tar.gz ExclusiveArch: %{go_arches} BuildRequires: golang >= %{golang_version} BuildRequires: make Provides: ccoctl = %{version}-%{release} %description %{summary} %prep %setup -q -n cloud-credential-operator-%{commit} %build %make_build build GO_BUILD_PACKAGES:=./cmd/ccoctl OS_GIT_VERSION=%{version} OS_GIT_COMMIT=%{shortcommit} OS_GIT_TREE_STATE=clean %install install -d %{buildroot}%{_bindir} install -p -m 755 ccoctl %{buildroot}%{_bindir}/ccoctl # Install bash completions install -d -m 755 %{buildroot}%{bash_completions_dir} %{buildroot}%{zsh_completions_dir} echo "+++ INSTALLING BASH COMPLETIONS FOR ccoctl " %{buildroot}%{_bindir}/ccoctl completion bash > %{buildroot}%{bash_completions_dir}/ccoctl echo "+++ INSTALLING ZSH COMPLETIONS FOR ccoctl " %{buildroot}%{_bindir}/ccoctl completion zsh > %{buildroot}%{zsh_completions_dir}/ccoctl %files %license LICENSE vendor/modules.txt %{_bindir}/ccoctl %{bash_completions_dir}/ccoctl %{zsh_completions_dir}/ccoctl %changelog