# Generated by go2rpm 1.9.0 %bcond_without check # https://github.com/cupcakearmy/autorestic %global goipath github.com/cupcakearmy/autorestic Version: 1.7.7 %gometa -f %global goname autorestic %global common_description %{expand: Config driven, easy backup cli for restic.} %global golicenses LICENSE %global godocs CHANGELOG.md DEVELOPMENT.md README.md Name: %{goname} Release: %autorelease Summary: Config driven, easy backup cli for restic License: Apache-2.0 URL: %{gourl} Source: %{gosource} # Fix the cmd tests that use Println instead of Printf. # https://github.com/cupcakearmy/autorestic/pull/318 Patch0: fix-println-to-printf-cmd-tests.patch %description %{common_description} %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/%{name} %{goipath} %{gobuilddir}/bin/%{name} completion bash > %{name}.bash %{gobuilddir}/bin/%{name} completion fish > %{name}.fish %{gobuilddir}/bin/%{name} completion zsh > %{name}.zsh %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm 0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dpm 0644 %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish install -Dpm 0644 %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} %if %{with check} %check %gocheck %endif %files %license LICENSE %doc CHANGELOG.md DEVELOPMENT.md README.md %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %changelog %autochangelog