forked from pool/restic
Accepting request 618380 from home:mnhauke
- Add subpackages for command line completions for bash and zsh shells OBS-URL: https://build.opensuse.org/request/show/618380 OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=6
This commit is contained in:
committed by
Git OBS Bridge
parent
105515e210
commit
75067f00e1
29
restic.spec
29
restic.spec
@@ -31,12 +31,33 @@ Source1: https://github.com/restic/%{name}/releases/download/v%{version}/
|
||||
Source2: %{name}.keyring
|
||||
# PATCH-FIX-OPENSUSE: Revert to using pre-1.8 Go APIs so we can build on Leap 42.x.
|
||||
Patch1: restic-switch-to-pre-1.8-sort.Stable-API.patch
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: zsh
|
||||
BuildRequires: golang(API) >= 1.6
|
||||
Recommends: %{name}-bash-completion
|
||||
|
||||
%description
|
||||
restic is a backup program that is fast, efficient and secure.
|
||||
|
||||
%package bash-completion
|
||||
Summary: Bash Completion for %{name}
|
||||
Group: System/Shells
|
||||
Requires: %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description bash-completion
|
||||
Bash command line completion support for %{name}.
|
||||
|
||||
%package zsh-completion
|
||||
Summary: Zsh Completion for %{name}
|
||||
Group: System/Shells
|
||||
Requires: %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description zsh-completion
|
||||
Zsh command line completion support for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
@@ -57,6 +78,8 @@ go build -o %{name} -buildmode=pie \
|
||||
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
./%{name} generate --man %{buildroot}%{_mandir}/man1
|
||||
install -Dm0644 doc/bash-completion.sh %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
||||
install -Dm0644 doc/zsh-completion.zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/%{name}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@@ -65,4 +88,10 @@ install -d %{buildroot}%{_mandir}/man1
|
||||
%{_bindir}/restic
|
||||
%{_mandir}/man1/restic*.1*
|
||||
|
||||
%files bash-completion
|
||||
%{_datadir}/bash-completion/completions/%{name}
|
||||
|
||||
%files zsh-completion
|
||||
%config %{_sysconfdir}/zsh_completion.d/%{name}
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user