# Generated by go2rpm 1.6.0 %bcond_without check # https://github.com/schollz/croc %global goipath github.com/schollz/croc Version: 9.5.2 %gometa %global common_description %{expand: croc is a tool that allows any two computers to simply and securely transfer files and folders.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: %autorelease Summary: Easily and securely send things from one computer to another License: MIT URL: %{gourl} Source0: %{gosource} # Drop shebang for bash completion Patch0: %{gourl}/pull/462.patch BuildRequires: systemd-rpm-macros %description %{common_description} %package -n croc Summary: %{summary} %description -n croc %{common_description} %gopkg %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/croc %{goipath} %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm0644 -t %{buildroot}%{_unitdir} croc.service install -Dpm0644 src/install/bash_autocomplete \ %{buildroot}%{_datadir}/bash-completion/completions/croc install -Dpm0644 src/install/zsh_autocomplete \ %{buildroot}%{_datadir}/zsh/site-functions/_croc %if %{with check} %check # disable tests that require internet access rm src/utils/utils_test.go %gocheck %endif %post %systemd_post croc.service %preun %systemd_preun croc.service %postun %systemd_postun_with_restart croc.service %files -n croc %license LICENSE %doc README.md %{_bindir}/* %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/croc %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_croc %{_unitdir}/croc.service %gopkgfiles %changelog %autochangelog