#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 gopath %{_datadir}/gocode %global import_path github.com/operator-framework/operator-sdk %global golang_version 1.18 %{!?commit:%global commit 23a982b81ba064596508510748bb8bb6eea19a4b} Name: operator-sdk Version: 1.22.0 Release: 1%{dist} Summary: Operator Framework SDK License: ASL 2.0 URL: https://%{import_path} Source0: https://github.com/openshift/ocp-release-operator-sdk/archive/%{commit}/ocp-release-operator-sdk-%{commit}.tar.gz ExclusiveArch: %{go_arches} BuildRequires: golang >= %{golang_version} BuildRequires: make Requires: bash-completion %description %{summary} %prep %setup -q -n ocp-release-operator-sdk-%{commit} %build %make_build -f ci/prow.Makefile patch %make_build build/operator-sdk SIMPLE_VERSION=%{version} GIT_VERSION=%{version} GIT_COMMIT=%{commit} %install install -d %{buildroot}%{_bindir} install -p -m 755 build/operator-sdk %{buildroot}%{_bindir}/operator-sdk # Install bash completions install -d -m 755 %{buildroot}%{_sysconfdir}/bash_completion.d/ echo "+++ INSTALLING BASH COMPLETIONS FOR operator-sdk " %{buildroot}%{_bindir}/operator-sdk completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/operator-sdk chmod 644 %{buildroot}%{_sysconfdir}/bash_completion.d/operator-sdk %files %license LICENSE %{_bindir}/operator-sdk %{_sysconfdir}/bash_completion.d/operator-sdk %changelog