# Generated by go2rpm 1.8.0 %bcond_without check # https://github.com/stern/stern %global goipath github.com/stern/stern Version: 1.21.0 # REMOVE BEFORE SUBMITTING THIS FOR REVIEW # --- # New Fedora packages should use %%gometa -f, which makes the package # ExclusiveArch to %%golang_arches_future and thus excludes the package from # %%ix86. If the new package is needed as a dependency for another pacage, # please consider removing that package from %%ix86 in the same way, instead of # building more go packages for i686. If your package is not a leaf package, # you'll need to coordinate the removal of the package's dependents first. # --- # REMOVE BEFORE SUBMITTING THIS FOR REVIEW %gometa %global goname stern %global common_description %{expand: Multi pod and container log tailing for Kubernetes} %global golicenses LICENSE %global godocs CONTRIBUTING.md README.md Name: %{goname} Release: %autorelease -b 4 Summary: Multi pod and container log tailing for Kubernetes License: Apache-2.0 URL: %{gourl} Source: %{gosource} %description %{common_description} %gopkg %prep %goprep # Upstream readme tooling rm -r ./hack %generate_buildrequires %go_generate_buildrequires %build export LDFLAGS="-X github.com/stern/stern/cmd.version=%{version} \ -X github.com/stern/stern/cmd.date=$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" %gobuild -o %{gobuilddir}/bin/stern %{goipath} # Generate shell completions %{gobuilddir}/bin/%{name} --completion bash > %{name}.bash %{gobuilddir}/bin/%{name} --completion fish > %{name}.fish %{gobuilddir}/bin/%{name} --completion zsh > %{name}.zsh %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Install shell completions install -Dpm 0644 %{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dpm 0644 %{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dpm 0644 %{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %if %{with check} %check %gocheck %endif %files %license LICENSE %doc CONTRIBUTING.md README.md %{_bindir}/* %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/%{name} %dir %{_datadir}/fish %dir %{_datadir}/fish/vendor_completions.d %{_datadir}/fish/vendor_completions.d/%{name}.fish %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_%{name} %gopkgfiles %changelog %autochangelog