# Generated by go2rpm 1 %bcond_without vendor %if %{without vendor} %bcond_without check %endif # https://github.com/cli/cli %global goipath github.com/cli/cli Version: 0.11.1 %gometa %global common_description %{expand: GitHubs official command line tool.} %global golicenses LICENSE %global godocs docs README.md script/changelog\\\ pkg/cmd/gist/fixture.txt Name: gh-cli Release: 1%{?dist} Summary: GitHubs official command line tool License: MIT URL: %{gourl} %if %{with vendor} # git clone https://github.com/cli/cli.git cli-%%{version} # cd cli-%%{version} # git checkout v%%{version} # go mod vendor # tar --exclude .git -czf cli-%%{version}-vendored.tar.gz cli-%%{version} Source0: cli-%{version}-vendored.tar.gz %else Source0: %{gosource} %endif %if %{with vendor} %else Provides: bundled(golang(github.com/AlecAivazis/survey/v2)) Provides: bundled(golang(github.com/AlecAivazis/survey/v2/core)) Provides: bundled(golang(github.com/AlecAivazis/survey/v2/terminal)) Provides: bundled(golang(github.com/briandowns/spinner)) Provides: bundled(golang(github.com/charmbracelet/glamour)) Provides: bundled(golang(github.com/google/shlex)) Provides: bundled(golang(github.com/hashicorp/go-version)) Provides: bundled(golang(github.com/henvic/httpretty)) Provides: bundled(golang(github.com/kballard/go-shellquote)) Provides: bundled(golang(github.com/MakeNowJust/heredoc)) Provides: bundled(golang(github.com/mattn/go-colorable)) Provides: bundled(golang(github.com/mattn/go-isatty)) Provides: bundled(golang(github.com/mgutz/ansi)) Provides: bundled(golang(github.com/mitchellh/go-homedir)) Provides: bundled(golang(github.com/shurcooL/githubv4)) Provides: bundled(golang(github.com/shurcooL/graphql)) Provides: bundled(golang(github.com/spf13/cobra)) Provides: bundled(golang(github.com/spf13/cobra/doc)) Provides: bundled(golang(github.com/spf13/pflag)) Provides: bundled(golang(golang.org/x/crypto/ssh/terminal)) Provides: bundled(golang(golang.org/x/text/width)) Provides: bundled(golang(gopkg.in/yaml.v3)) %endif %if %{with check} # Tests BuildRequires: golang(github.com/google/go-cmp/cmp) BuildRequires: golang(github.com/stretchr/testify/assert) BuildRequires: golang(github.com/stretchr/testify/require) %endif %description %{common_description} %gopkg %prep %if %{with vendor} %goprep -k %else %goprep %endif %build %gobuild -o %{gobuilddir}/bin/gh %{goipath}/cmd/gh %install %if %{without vendor} %gopkginstall %endif install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check %gocheck %endif %files %license LICENSE %doc docs README.md script/changelog pkg/cmd/gist/fixture.txt %{_bindir}/* %if %{without vendor} %gopkgfiles %endif %changelog * Thu Jul 30 16:58:38 CST 2020 Qiyu Yan - 0.11.1-1 - Initial package