Accepting request 1231916 from devel:tools:scm

OBS-URL: https://build.opensuse.org/request/show/1231916
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jujutsu?expand=0&rev=16
This commit is contained in:
Ana Guerrero 2024-12-18 19:11:04 +00:00 committed by Git OBS Bridge
commit 5e18891223
2 changed files with 61 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 18 14:52:06 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- add completion subpackages for bash, fish and zsh
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 5 05:54:17 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de> Thu Dec 5 05:54:17 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de>

View File

@ -32,6 +32,10 @@ BuildRequires: gnupg
BuildRequires: openssh-common BuildRequires: openssh-common
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: zstd BuildRequires: zstd
# dependencies for completion subpackages
BuildRequires: bash-completion
BuildRequires: fish
BuildRequires: zsh
# serde_bser fails to compile on s390x # serde_bser fails to compile on s390x
# error[E0599]: no method named `put_f64_be` found for struct `Vec<u8>` in the current scope # error[E0599]: no method named `put_f64_be` found for struct `Vec<u8>` in the current scope
@ -59,6 +63,37 @@ stable, and most developers use it daily for all their needs, there may still
be work-in-progress features, suboptimal UX, and workflow gaps that make it be work-in-progress features, suboptimal UX, and workflow gaps that make it
unusable for your particular use. unusable for your particular use.
%package -n %{name}-bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description -n %{name}-bash-completion
Bash command line completion support for %{name}.
%package -n %{name}-fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and fish)
BuildArch: noarch
%description -n %{name}-fish-completion
Fish command line completion support for %{name}.
%package -n %{name}-zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description -n %{name}-zsh-completion
zsh command line completion support for %{name}.
%prep %prep
%autosetup -p 1 -a 1 %autosetup -p 1 -a 1
@ -69,6 +104,18 @@ unusable for your particular use.
install -D -d -m 0755 %{buildroot}%{_bindir} install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{binary_name} %{buildroot}%{_bindir}/%{binary_name} install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{binary_name} %{buildroot}%{_bindir}/%{binary_name}
# create the bash completion file
mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions/
%{buildroot}/%{_bindir}/%{binary_name} util completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{binary_name}
# create the fish completion file
mkdir -p %{buildroot}%{_datarootdir}/fish/vendor_completions.d/
%{buildroot}/%{_bindir}/%{binary_name} util completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{binary_name}.fish
# create the zsh completion file
mkdir -p %{buildroot}%{_datarootdir}/zsh/site-functions/
%{buildroot}/%{_bindir}/%{binary_name} util completion zsh > %{buildroot}%{_datarootdir}/zsh/site-functions/_%{binary_name}
%check %check
rm -rf tests/contest/ rm -rf tests/contest/
%{cargo_test} %{cargo_test}
@ -78,4 +125,13 @@ rm -rf tests/contest/
%license LICENSE %license LICENSE
%{_bindir}/%{binary_name} %{_bindir}/%{binary_name}
%files -n %{name}-bash-completion
%{_datarootdir}/bash-completion/completions/%{binary_name}
%files -n %{name}-fish-completion
%{_datarootdir}/fish/vendor_completions.d/%{binary_name}.fish
%files -n %{name}-zsh-completion
%{_datarootdir}/zsh/site-functions/_%{binary_name}
%changelog %changelog