]> git.pld-linux.org Git - packages/rclone.git/blob - rclone.spec
up to 1.59.2
[packages/rclone.git] / rclone.spec
1 %define         vendor_ver      1.59.1
2 Summary:        rsync for cloud storage
3 Name:           rclone
4 Version:        1.59.1
5 Release:        1
6 License:        MIT
7 Group:          Networking/Utilities
8 #Source0Download: https://github.com/rclone/rclone/releases
9 Source0:        https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz
10 # Source0-md5:  2e8600f858109477e6ce7cf02d4919be
11 # cd rclone-%{version}
12 # go mod vendor
13 # cd ..
14 # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor
15 Source1:        %{name}-vendor-%{vendor_ver}.tar.xz
16 # Source1-md5:  eed29d627ba0afd4eb700347dfdef9c8
17 Patch0:         webdav-modtime.patch
18 URL:            https://rclone.org/
19 BuildRequires:  golang >= 1.14
20 BuildRequires:  rpm-build >= 4.6
21 BuildRequires:  rpmbuild(macros) >= 2.009
22 BuildRequires:  tar >= 1:1.22
23 BuildRequires:  xz
24 ExclusiveArch:  %go_arches
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _debugsource_packages   0
28
29 %description
30 Rclone is a command line program to sync files and directories to and
31 from different cloud storage providers.
32
33 %package -n bash-completion-rclone
34 Summary:        bash-completion for rclone
35 Group:          Applications/Shells
36 Requires:       %{name} = %{version}-%{release}
37 Requires:       bash-completion >= 1:2.0
38 BuildArch:      noarch
39
40 %description -n bash-completion-rclone
41 This package provides bash-completion for rclone.
42
43 %package -n fish-completion-rclone
44 Summary:        Fish completion for rclone command
45 Group:          Applications/Shells
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       fish
48 BuildArch:      noarch
49
50 %description -n fish-completion-rclone
51 Fish completion for rclone command.
52
53 %package -n zsh-completion-rclone
54 Summary:        Zsh completion for rclone command
55 Group:          Applications/Shells
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       zsh
58 BuildArch:      noarch
59
60 %description -n zsh-completion-rclone
61 Zsh completion for rclone command.
62
63 %prep
64 %setup -q -a1 -n %{name}-v%{version}
65 %patch0 -p1
66
67 %{__mv} %{name}-v%{vendor_ver}/vendor .
68
69 %{__mkdir_p} .go-cache
70
71 %build
72 %__go build -v -mod=vendor --ldflags "-X github.com/rclone/rclone/fs.Version=%{version}" -o bin/rclone
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{bash_compdir},%{fish_compdir},%{zsh_compdir}}
78
79 cp -p bin/rclone $RPM_BUILD_ROOT%{_bindir}
80 cp -p rclone.1 $RPM_BUILD_ROOT%{_mandir}/man1
81
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
86 %clean
87 rm -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*
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.070887 seconds and 3 git commands to generate.