X-Git-Url: http://git.pld-linux.org/?p=packages%2Frclone.git;a=blobdiff_plain;f=rclone.spec;h=1604ade128e72e5250c52e74e53df4dec11477da;hp=4d798e42fa0cc77524a93e3e6e827fcd80b70fe6;hb=HEAD;hpb=d58f8ecc2354833ba027cc2f252dbf8994babe75 diff --git a/rclone.spec b/rclone.spec index 4d798e4..f343ac0 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,43 +1,89 @@ +%define vendor_ver 1.66.0 + Summary: rsync for cloud storage Name: rclone -Version: 1.53.3 +Version: 1.66.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 76bb7a543b04ea243d611bd0f934e351 +# Source0-md5: ae301cfeecf0675209d0acbfd8eaf05a # cd rclone-%{version} # go mod vendor # cd .. -# tar cJf rclonevendor-%{version}.tar.xz rclone-%{version}/vendor -Source1: %{name}-vendor-%{version}.tar.xz -# Source1-md5: eb0153a39af5cd5e7bf40a69b6ae2542 +# tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor +Source1: %{name}-vendor-%{vendor_ver}.tar.xz +# Source1-md5: acca3f3203821e5623497bccce73de75 +Patch0: webdav-modtime.patch URL: https://rclone.org/ -BuildRequires: golang >= 1.12 -ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x +BuildRequires: golang >= 1.20 +BuildRequires: rpm-build >= 4.6 +BuildRequires: rpmbuild(macros) >= 2.009 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz +ExclusiveArch: %go_arches BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _debugsource_packages 0 + %description Rclone is a command line program to sync files and directories to and from different cloud storage providers. +%package -n bash-completion-rclone +Summary: bash-completion for rclone +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: bash-completion >= 1:2.0 +BuildArch: noarch + +%description -n bash-completion-rclone +This package provides bash-completion for rclone. + +%package -n fish-completion-rclone +Summary: Fish completion for rclone command +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: fish +BuildArch: noarch + +%description -n fish-completion-rclone +Fish completion for rclone command. + +%package -n zsh-completion-rclone +Summary: Zsh completion for rclone command +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: zsh +BuildArch: noarch + +%description -n zsh-completion-rclone +Zsh completion for rclone command. + %prep -%setup -q -b1 -n %{name}-v%{version} +%setup -q -a1 -n %{name}-v%{version} +%patch0 -p1 + +%{__mv} %{name}-v%{vendor_ver}/vendor . %{__mkdir_p} .go-cache %build -GOCACHE="$(pwd)/.go-cache" go build -v -mod=vendor --ldflags "-s -X github.com/rclone/rclone/fs.Version=%{version}" -o bin/rclone +%__go build -v -mod=vendor --ldflags "-X github.com/rclone/rclone/fs.Version=%{version}" -o bin/rclone %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} +install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{bash_compdir},%{fish_compdir},%{zsh_compdir}} cp -p bin/rclone $RPM_BUILD_ROOT%{_bindir} cp -p rclone.1 $RPM_BUILD_ROOT%{_mandir}/man1 +$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete bash $RPM_BUILD_ROOT%{bash_compdir}/rclone +$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete fish $RPM_BUILD_ROOT%{fish_compdir}/rclone.fish +$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete zsh $RPM_BUILD_ROOT%{zsh_compdir}/_rclone + %clean rm -rf $RPM_BUILD_ROOT @@ -46,3 +92,15 @@ rm -rf $RPM_BUILD_ROOT %doc CONTRIBUTING.md MAINTAINERS.md MANUAL.md README.md %attr(755,root,root) %{_bindir}/rclone %{_mandir}/man1/rclone.1* + +%files -n bash-completion-rclone +%defattr(644,root,root,755) +%{bash_compdir}/rclone + +%files -n fish-completion-%{name} +%defattr(644,root,root,755) +%{fish_compdir}/rclone.fish + +%files -n zsh-completion-%{name} +%defattr(644,root,root,755) +%{zsh_compdir}/_rclone