#debuginfo not supported with Go %global debug_package %{nil} %global package_name openshift-serverless-clients %global product_name OpenShift Serverless %global golang_version 1.17 %global kn_version 1.4 %global kn_release 1 %global kn_cli_version v%{kn_version} %global kn_event_image %{nil} %global source_dir knative-client %global source_tar %{source_dir}-release-%{kn_cli_version}.tar.gz Name: %{package_name} Version: %{kn_version}.0 Release: %{kn_release}%{?dist} Summary: %{product_name} client kn CLI binary License: ASL 2.0 URL: https://knative.dev/ Source0: https://github.com/openshift/knative-client/archive/release-%{kn_cli_version}/%{source_tar} BuildRequires: golang >= %{golang_version} BuildRequires: make %description Client kn provides developer experience to work with Knative Serving APIs. %prep %setup -q -n %{source_dir}-release-%{kn_cli_version} %build TAG=%{kn_cli_version} \ KN_PLUGIN_EVENT_SENDER_IMAGE=%{kn_event_image} \ REPO_ROOT_DIR=`pwd` \ %make_build build %install mkdir -p %{buildroot}/%{_bindir} install -m 0755 ./kn %{buildroot}/%{_bindir}/kn # Install bash completions install -d -m 755 %{buildroot}%{_sysconfdir}/bash_completion.d/ echo "+++ INSTALLING BASH COMPLETIONS FOR kn " %{buildroot}%{_bindir}/kn completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/kn chmod 644 %{buildroot}%{_sysconfdir}/bash_completion.d/kn %files %license LICENSE %{_bindir}/kn %{_sysconfdir}/bash_completion.d/kn %changelog