## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Generated by go2rpm 1.5.0 %bcond_without check # https://github.com/cli/cli %global forgeurl https://github.com/cli/cli %global goipath github.com/cli/cli/v2 Version: 2.5.1 %gometa %global goname gh %global common_description %{expand: GitHub’s official command line tool.} %global godevelheader %{expand: Obsoletes: golang-github-cli-devel < 2.4.0-3 } %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: %autorelease Summary: GitHub’s official command line tool License: MIT URL: %{gourl} Source0: %{gosource} BuildRequires: git-core BuildRequires: go-rpm-macros BuildRequires: sed Requires: git-core %description %{common_description} %gopkg %prep %goprep %generate_buildrequires %go_generate_buildrequires %build export LDFLAGS="-X github.com/cli/cli/v2/internal/build.Version=%{version} \ -X github.com/cli/cli/v2/internal/build.Date=$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" for cmd in cmd/%{name} cmd/gen-docs; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done # Generate manpages %{gobuilddir}/bin/gen-docs --man-page --doc-path ./share/man/man1 # Generate shell completions %{gobuilddir}/bin/%{name} completion -s bash > %{name}.bash %{gobuilddir}/bin/%{name} completion -s fish > %{name}.fish %{gobuilddir}/bin/%{name} completion -s zsh > %{name}.zsh %install %gopkginstall # We are deliberately excluding cmd/gen-docs. It is only needed for building. install -Dpm 0755 %{gobuilddir}/bin/%{name} -t %{buildroot}%{_bindir}/ # Install manpages install -Dpm 0644 ./share/man/man1/%{name}*.1 -t %{buildroot}%{_mandir}/man1/ # 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 # pkg/liveshare fails with golang-1.18 %gocheck -d pkg/liveshare %endif %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}*1* %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 * Thu Feb 17 2022 Mikel Olasagasti Uranga 2.5.1-1 - Update to 2.5.1 * Thu Feb 03 2022 Maxwell G 2.5.0-2 - Fix forgeurl * Wed Feb 02 2022 Mikel Olasagasti Uranga 2.5.0-1 - Update to 2.5.0 * Sat Jan 29 2022 Maxwell G 2.4.0-7 - Fix ldflags and rebuild for new go-rpm-macros. * Tue Jan 25 2022 Mikel Olasagasti Uranga 2.4.0-6 - Fix test that fails with golang-1.18 - Closes rhbz#2045415 * Thu Jan 20 2022 Fedora Release Engineering 2.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 18 2022 sixg0000d 2.4.0-4 - Fix: generate correct shell completions * Wed Jan 12 2022 Maxwell G 2.4.0-3 - Fix %%goipath; generate manpages; fix dependencies * Thu Dec 30 2021 Mikel Olasagasti Uranga 2.4.0-1 - Update to 2.4.0. Closes rhbz#2034689 * Mon Dec 20 2021 Mikel Olasagasti Uranga 2.3.0-2 - Skip a failing test with golang-1.18 * Mon Dec 20 2021 Mikel Olasagasti Uranga 2.3.0-1 - Initial package - Fixes rhbz#2010367