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