]> git.pld-linux.org Git - packages/rclone.git/blobdiff - rclone.spec
generate and package bash/fish/zsh completions
[packages/rclone.git] / rclone.spec
index 4d798e42fa0cc77524a93e3e6e827fcd80b70fe6..f3175aaf11eb3793c6da2eec7fec89e8e463befa 100644 (file)
@@ -1,43 +1,83 @@
 Summary:       rsync for cloud storage
 Name:          rclone
-Version:       1.53.3
+Version:       1.55.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: 16389b8398ecf5c0b9942dbfc956ff88
 # cd rclone-%{version}
 # go mod vendor
 # cd ..
-# tar cJf rclonevendor-%{version}.tar.xz rclone-%{version}/vendor
+# tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor
 Source1:       %{name}-vendor-%{version}.tar.xz
-# Source1-md5: eb0153a39af5cd5e7bf40a69b6ae2542
+# Source1-md5: 9de5b2c00f12d4f082c0c24f7e3e01d4
 URL:           https://rclone.org/
-BuildRequires: golang >= 1.12
+BuildRequires: golang >= 1.14
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 2.005
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
 ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x
 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 >= 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}
 
 %{__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
+GOCACHE="$(pwd)/.go-cache" 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 +86,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
This page took 0.055178 seconds and 4 git commands to generate.