#debuginfo not supported with Go %global debug_package %{nil} %global package_name openshift-pipelines-client %global product_name OpenShift Pipelines %global golang_version 1.17 %global tkn_version 0.24.0 %global tkn_release 1 %global tkn_cli_version v%{tkn_version} %global tkn_commit fc02d2a28afd9d3afc6ebe54dbefe356343cfc85 %global source_dir cli-%{tkn_commit} %global source_tar %{source_dir}.tar.gz Name: %{package_name} Version: %{tkn_version} Release: %{tkn_release}%{?dist} Summary: %{product_name} client tkn CLI binary License: ASL 2.0 URL: https://tekton.dev/ Source0: https://github.com/tektoncd/cli/archive/%{tkn_commit}/%{source_tar} BuildRequires: golang >= %{golang_version} BuildRequires: make %description Client tkn provides developer experience to work with Tekton Pipelines. %prep %setup -q -n %{source_dir} %build REPO_ROOT_DIR=`pwd` \ %make_build bin/tkn RELEASE_VERSION=%{tkn_version} %install mkdir -p %{buildroot}/%{_bindir} install -m 0755 bin/tkn %{buildroot}/%{_bindir}/tkn # Install bash completions install -d -m 755 %{buildroot}%{_sysconfdir}/bash_completion.d/ install -d -m 755 %{buildroot}%{_datadir}/zsh/site-functions/ echo "+++ INSTALLING BASH COMPLETIONS FOR tkn " %{buildroot}%{_bindir}/tkn completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/tkn %{buildroot}%{_bindir}/tkn completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_tkn chmod 644 %{buildroot}%{_sysconfdir}/bash_completion.d/tkn %files %license LICENSE %{_bindir}/tkn %dir %{_sysconfdir}/bash_completion.d %{_sysconfdir}/bash_completion.d/tkn %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_tkn %changelog