# Generated by go2rpm 1.8.0 %bcond_without check # https://github.com/rclone/rclone %global goipath github.com/rclone/rclone Version: 1.68.1 %global gomodulesmode GO111MODULE=on %gometa -f %global goname rclone %global common_description %{expand: Rclone is a command line program to sync files and directories to and from various cloud services.} Name: %{goname} Release: %autorelease Summary: Rsync for cloud storage License: MIT URL: %{gourl} Source: %{gosource} BuildRequires: git-core %description %{common_description} %prep %goprep -k go env -w GOPROXY=https://proxy.golang.org,direct go env -w GOSUMDB=sum.golang.org go mod vendor -v %build export LDFLAGS="-X github.com/rclone/rclone/fs.Version=v%{version}" %gobuild -o %{gobuilddir}/bin/rclone %{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 ./rclone.1 %{buildroot}%{_mandir}/man1/rclone.1 install -Dp %{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dp %{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dp %{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name} install -m 0755 -vd %{buildroot}%{_sbindir} ln -rs %{buildroot}%{_bindir}/rclone %{buildroot}%{_sbindir}/mount.rclone ln -rs %{buildroot}%{_bindir}/rclone %{buildroot}%{_bindir}/rclonefs chmod -R 755 _build/pkg/mod %if %{with check} %check %endif %files %license COPYING %license vendor/modules.txt %doc MAINTAINERS.md MANUAL.html RELEASE.md CONTRIBUTING.md MANUAL.md README.md %doc docs/ %{_bindir}/rclone* %{_sbindir}/mount.rclone %{_mandir}/man1/rclone.1* %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %changelog %autochangelog