1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00

Makefile/rpm: Add shell completions

Signed-off-by: renner <renner0@posteo.de>
This commit is contained in:
renner
2026-01-21 17:03:28 +01:00
committed by Colin Walters
parent 1d8cf090f9
commit 1f5813f13c
2 changed files with 18 additions and 1 deletions

View File

@@ -43,8 +43,15 @@ bin: manpages
manpages:
cargo run --release --package xtask -- manpages
.PHONY: completion
completion:
mkdir -p target/completion
for shell in bash elvish fish powershell zsh; do \
target/release/bootc completion $$shell > target/completion/bootc.$$shell; \
done
STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage)
install:
install: completion
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/system-reinstall-bootc
install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/bound-images.d
@@ -54,6 +61,9 @@ install:
install -d $(DESTDIR)$(prefix)/lib/bootc/install
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man5 target/man/*.5; \
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 target/man/*.8; \
install -D -m 0644 target/completion/bootc.bash $(DESTDIR)$(prefix)/share/bash-completion/completions/bootc
install -D -m 0644 target/completion/bootc.zsh $(DESTDIR)$(prefix)/share/zsh/site-functions/_bootc
install -D -m 0644 target/completion/bootc.fish $(DESTDIR)$(prefix)/share/fish/vendor_completions.d/bootc.fish
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot

View File

@@ -164,6 +164,10 @@ chmod +x %{?buildroot}/%{system_reinstall_bootc_install_podman_path}
touch %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir
find %{?buildroot}/%{_docdir} ! -type d -printf '%{_docdir}/%%P\n' | sort > bootcdoclist.txt
install -Dpm 0644 target/completion/bootc.bash %{buildroot}%{bash_completions_dir}/bootc
install -Dpm 0644 target/completion/bootc.zsh %{buildroot}%{zsh_completions_dir}/_bootc
install -Dpm 0644 target/completion/bootc.fish %{buildroot}%{fish_completions_dir}/bootc.fish
%if %{with check}
%check
if grep -qEe 'Seccomp:.*0$' /proc/self/status; then
@@ -190,6 +194,9 @@ fi
%endif
%{_unitdir}/*
%{_mandir}/man*/*bootc*
%{bash_completions_dir}/bootc
%{zsh_completions_dir}/_bootc
%{fish_completions_dir}/bootc.fish
%files -n system-reinstall-bootc
%{_bindir}/system-reinstall-bootc