File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,8 +43,15 @@ bin: manpages
4343manpages :
4444 cargo run --release --package xtask -- manpages
4545
46+ .PHONY : completion
47+ completion :
48+ mkdir -p target/completion
49+ for shell in bash elvish fish powershell zsh; do \
50+ target/release/bootc completion $$ shell > target/completion/bootc.$$ shell; \
51+ done
52+
4653STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix ) /lib/bootc/storage" /sysroot/ostree/bootc/storage)
47- install :
54+ install : completion
4855 install -D -m 0755 -t $(DESTDIR )$(prefix ) /bin target/release/bootc
4956 install -D -m 0755 -t $(DESTDIR )$(prefix ) /bin target/release/system-reinstall-bootc
5057 install -d -m 0755 $(DESTDIR )$(prefix ) /lib/bootc/bound-images.d
@@ -54,6 +61,9 @@ install:
5461 install -d $(DESTDIR )$(prefix ) /lib/bootc/install
5562 install -D -m 0644 -t $(DESTDIR )$(prefix ) /share/man/man5 target/man/* .5; \
5663 install -D -m 0644 -t $(DESTDIR )$(prefix ) /share/man/man8 target/man/* .8; \
64+ install -D -m 0644 target/completion/bootc.bash $(DESTDIR )$(prefix ) /share/bash-completion/completions/bootc
65+ install -D -m 0644 target/completion/bootc.zsh $(DESTDIR )$(prefix ) /share/zsh/site-functions/_bootc
66+ install -D -m 0644 target/completion/bootc.fish $(DESTDIR )$(prefix ) /share/fish/vendor_completions.d/bootc.fish
5767 install -D -m 0644 -t $(DESTDIR ) /$(prefix ) /lib/systemd/system systemd/* .service systemd/* .timer systemd/* .path systemd/* .target
5868 install -D -m 0644 -t $(DESTDIR ) /$(prefix ) /share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
5969 install -d -m 755 $(DESTDIR ) /$(prefix ) /share/doc/bootc/baseimage/base/sysroot
Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ chmod +x %{?buildroot}/%{system_reinstall_bootc_install_podman_path}
164164touch %{?buildroot }/%{_docdir }/bootc/baseimage/base/sysroot/.keepdir
165165find %{?buildroot }/%{_docdir } ! -type d -printf ' %{_docdir}/%%P\n' | sort > bootcdoclist.txt
166166
167+ install -Dpm 0644 target/completion/bootc.bash %{buildroot }%{bash_completions_dir }/bootc
168+ install -Dpm 0644 target/completion/bootc.zsh %{buildroot }%{zsh_completions_dir }/_bootc
169+ install -Dpm 0644 target/completion/bootc.fish %{buildroot }%{fish_completions_dir }/bootc.fish
170+
167171%if %{with check }
168172%check
169173if grep -qEe ' Seccomp:.*0$' /proc/self/status; then
190194%endif
191195%{_unitdir }/*
192196%{_mandir }/man* /* bootc*
197+ %{bash_completions_dir }/bootc
198+ %{zsh_completions_dir }/_bootc
199+ %{fish_completions_dir }/bootc.fish
193200
194201%files -n system-reinstall-bootc
195202%{_bindir }/system-reinstall-bootc
You can’t perform that action at this time.
0 commit comments