up to 1.59.1
[packages/rclone.git] / rclone.spec
CommitLineData
d15cf859 1%define vendor_ver 1.59.1
d58f8ecc
JP
2Summary: rsync for cloud storage
3Name: rclone
d15cf859 4Version: 1.59.1
d58f8ecc
JP
5Release: 1
6License: MIT
7Group: Networking/Utilities
8#Source0Download: https://github.com/rclone/rclone/releases
9Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz
d15cf859 10# Source0-md5: 2e8600f858109477e6ce7cf02d4919be
d58f8ecc
JP
11# cd rclone-%{version}
12# go mod vendor
13# cd ..
64ad0af3 14# tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor
f5d5d633 15Source1: %{name}-vendor-%{vendor_ver}.tar.xz
d15cf859 16# Source1-md5: eed29d627ba0afd4eb700347dfdef9c8
a5880a6d 17Patch0: webdav-modtime.patch
d58f8ecc 18URL: https://rclone.org/
15b5403e 19BuildRequires: golang >= 1.14
1c00b327 20BuildRequires: rpm-build >= 4.6
c3274206 21BuildRequires: rpmbuild(macros) >= 2.009
64ad0af3
JP
22BuildRequires: tar >= 1:1.22
23BuildRequires: xz
c3274206 24ExclusiveArch: %go_arches
d58f8ecc
JP
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
39227d4a
JP
27%define _debugsource_packages 0
28
d58f8ecc
JP
29%description
30Rclone is a command line program to sync files and directories to and
31from different cloud storage providers.
32
1c00b327
JP
33%package -n bash-completion-rclone
34Summary: bash-completion for rclone
35Group: Applications/Shells
36Requires: %{name} = %{version}-%{release}
7561c9fa 37Requires: bash-completion >= 1:2.0
1c00b327
JP
38BuildArch: noarch
39
40%description -n bash-completion-rclone
41This package provides bash-completion for rclone.
42
43%package -n fish-completion-rclone
44Summary: Fish completion for rclone command
45Group: Applications/Shells
46Requires: %{name} = %{version}-%{release}
47Requires: fish
48BuildArch: noarch
49
50%description -n fish-completion-rclone
51Fish completion for rclone command.
52
53%package -n zsh-completion-rclone
54Summary: Zsh completion for rclone command
55Group: Applications/Shells
56Requires: %{name} = %{version}-%{release}
57Requires: zsh
58BuildArch: noarch
59
60%description -n zsh-completion-rclone
61Zsh completion for rclone command.
62
d58f8ecc 63%prep
f5d5d633 64%setup -q -a1 -n %{name}-v%{version}
a5880a6d 65%patch0 -p1
f5d5d633
JP
66
67%{__mv} %{name}-v%{vendor_ver}/vendor .
d58f8ecc
JP
68
69%{__mkdir_p} .go-cache
70
71%build
c3274206 72%__go build -v -mod=vendor --ldflags "-X github.com/rclone/rclone/fs.Version=%{version}" -o bin/rclone
d58f8ecc
JP
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
1c00b327 77install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{bash_compdir},%{fish_compdir},%{zsh_compdir}}
d58f8ecc
JP
78
79cp -p bin/rclone $RPM_BUILD_ROOT%{_bindir}
80cp -p rclone.1 $RPM_BUILD_ROOT%{_mandir}/man1
81
1c00b327
JP
82$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete bash $RPM_BUILD_ROOT%{bash_compdir}/rclone
83$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete fish $RPM_BUILD_ROOT%{fish_compdir}/rclone.fish
84$RPM_BUILD_ROOT%{_bindir}/rclone genautocomplete zsh $RPM_BUILD_ROOT%{zsh_compdir}/_rclone
85
d58f8ecc
JP
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%files
90%defattr(644,root,root,755)
91%doc CONTRIBUTING.md MAINTAINERS.md MANUAL.md README.md
92%attr(755,root,root) %{_bindir}/rclone
93%{_mandir}/man1/rclone.1*
1c00b327
JP
94
95%files -n bash-completion-rclone
96%defattr(644,root,root,755)
97%{bash_compdir}/rclone
98
99%files -n fish-completion-%{name}
100%defattr(644,root,root,755)
101%{fish_compdir}/rclone.fish
102
103%files -n zsh-completion-%{name}
104%defattr(644,root,root,755)
105%{zsh_compdir}/_rclone
This page took 0.117097 seconds and 4 git commands to generate.