# Generated by go2rpm 1.15.0 %bcond check 1 %bcond bootstrap 0 %global debug_package %{nil} %if %{with bootstrap} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ %endif # https://github.com/twpayne/chezmoi %global goipath github.com/twpayne/chezmoi Version: 2.60.1 %gometa -f %global common_description %{expand: Manage your dotfiles across multiple diverse machines, securely.} %global golicenses LICENSE %global godocs README.md Name: chezmoi Release: %autorelease Summary: Manage your dotfiles across multiple diverse machines, securely License: MIT URL: %{gourl} Source: %{gosource} BuildRequires: git BuildRequires: golang >= 1.24 %description %{common_description} %gopkg %prep %goprep -A -k %autopatch -p1 %if %{without bootstrap} %generate_buildrequires %endif %if %{without bootstrap} %build DATE=$( date -u '+%Y-%m-%dT%H:%M:%SZ' ) go build -ldflags "-X main.version=%{version} \ -X main.date=$DATE \ -X \"main.builtBy=Fedora COPR"\" . %endif %install %gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp chezmoi %{buildroot}%{_bindir}/ install -Dpm 0644 completions/%{name}-completion.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dpm 0644 completions/%{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dpm 0644 completions/%{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %endif %if %{without bootstrap} %if %{with check} %check make test %endif %endif %if %{without bootstrap} %files %license %{golicenses} %doc %{godocs} %{_bindir}/chezmoi %{_datadir}/bash-completion/completions/%{name} %{_datadir}/fish/vendor_completions.d/%{name}.fish %{_datadir}/zsh/site-functions/_%{name} %endif %gopkgfiles %changelog %autochangelog