From baa4cab5af465e1e25477322944c24c68209186c Mon Sep 17 00:00:00 2001 From: Elan Ruusamäe Date: Sun, 26 Jul 2015 15:43:51 +0300 Subject: add bash/zsh completion subpackages diff --git a/sysdig.spec b/sysdig.spec index 08e172f..17fb1a8 100644 --- a/sysdig.spec +++ b/sysdig.spec @@ -15,6 +15,8 @@ BuildRequires: ncurses-devel >= 5.9 BuildRequires: zlib-devel >= 1.2.8 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define zshdir %{_datadir}/zsh/site-functions + %description Sysdig instruments your physical and virtual machines at the OS level by installing into the Linux kernel and capturing system calls and @@ -23,6 +25,30 @@ filter and decode these events in order to extract useful information. Sysdig can be used to inspect systems live in real-time, or to generate trace files that can be analyzed at a later stage. +%package -n bash-completion-%{name} +Summary: bash-completion for sysdig +Summary(pl.UTF-8): Bashowe dopełnianie składni dla sysdig +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: bash-completion +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif + +%description -n bash-completion-%{name} +bash-completion for sysdig. + +%package -n zsh-completion-%{name} +Summary: zsh-completion for sysdig +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif + +%description -n zsh-completion-%{name} +zsh-completion for sysdig. + %prep %setup -q @@ -59,6 +85,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/sysdig.8* %{_datadir}/%{name} %{_prefix}/src/sysdig-%{version} + +%files -n bash-completion-%{name} +%defattr(644,root,root,755) /etc/bash_completion.d/sysdig -%{_datadir}/zsh/site-functions/_sysdig + +%files -n zsh-completion-%{name} +%defattr(644,root,root,755) +%{zshdir}/_sysdig %{_datadir}/zsh/vendor-completions/_sysdig -- cgit v0.10.2