%bcond check 1 %bcond bootstrap 0 %define ver %(curl -s https://api.github.com/repos/jesseduffield/lazygit/releases/latest | grep tag_name | cut -d '"' -f4 | cut -d 'v' -f2) %if %{with bootstrap} %global debug_package %{nil} %endif %if %{with bootstrap} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ %endif # https://github.com/jesseduffield/lazygit %global goipath github.com/jesseduffield/lazygit Version: %{ver} %gometa -f %global common_description %{expand: Simple terminal UI for git commands.} %global golicenses LICENSE %global godocs docs CODE-OF-CONDUCT.md CONTRIBUTING.md README.md\\\ VISION.md demo/README.md pkg/gui/filetree/README.md\\\ pkg/gui/presentation/authors/authors.go\\\ pkg/gui/presentation/authors/authors_test.go\\\ pkg/i18n/translations/README.md\\\ pkg/integration/README.md Name: lazygit Release: %autorelease Summary: Simple terminal UI for git commands License: MIT URL: %{gourl} Source: %{gosource} BuildRequires: git %description %{common_description} %gopkg %prep %goprep -A %if %{without bootstrap} %build export GO111MODULE=on go mod vendor %gobuild -o %{gobuilddir}/bin/lazygit %{goipath} %endif %install %gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %endif %if %{without bootstrap} %files %license LICENSE %doc docs CODE-OF-CONDUCT.md CONTRIBUTING.md README.md VISION.md demo/README.md %doc pkg/gui/filetree/README.md pkg/gui/presentation/authors/authors.go %doc pkg/gui/presentation/authors/authors_test.go %doc pkg/i18n/translations/README.md pkg/integration/README.md %{_bindir}/lazygit %endif %gopkgfiles %changelog %autochangelog