media-video/wl-screenrec: Add shells completions

Signed-off-by: Henri Gasc <gasc@eurecom.fr>
This commit is contained in:
Henri Gasc
2024-11-15 18:01:27 +01:00
parent df3f325d28
commit 988b32e554

View File

@@ -110,7 +110,7 @@ CRATES="
windows_x86_64_msvc@0.52.6
"
inherit cargo
inherit cargo shell-completion
DESCRIPTION="High performance screen/audio recorder for wlroots"
HOMEPAGE="https://github.com/russelltg/wl-screenrec"
@@ -135,6 +135,22 @@ DEPEND="${RDEPEND}"
QA_FLAGS_IGNORED="usr/bin/${PN}"
src_compile() {
cargo_src_compile
./"${S}"/target/release/"${PN}" --generate-completions bash > "${S}/wl-screenrec.bash"
./"${S}"/target/release/"${PN}" --generate-completions fish > "${S}/wl-screenrec.fish"
./"${S}"/target/release/"${PN}" --generate-completions zsh > "${S}/wl-screenrec.zsh"
}
src_install() {
cargo_src_install
dobashcomp "${S}/wl-screenrec.bash"
dofishcomp "${S}/wl-screenrec.fish"
dozshcomp "${S}/wl-screenrec.zsh"
}
pkg_postinst() {
elog "To use this software, you need vaapi encoding support."
elog "You also need a wayland compositor that supports the"