From 643a495f3bd74b20e0d7c120d09cb963a908cb29 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Mon, 3 Jun 2024 10:27:24 +0300 Subject: [PATCH] spec: Fix install of already llama- prefixed binaries Such as llama-bench. Signed-off-by: Vitaly Chikunov --- .gear/llama.cpp.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gear/llama.cpp.spec b/.gear/llama.cpp.spec index 1f73a6167..bc9467499 100644 --- a/.gear/llama.cpp.spec +++ b/.gear/llama.cpp.spec @@ -101,8 +101,10 @@ install -Dp examples/*.sh -t %buildroot%_datadir/%name/examples install -Dp examples/*.py -t %buildroot%_datadir/%name/examples # Install and rename binaries to have llama- prefix. cd %_cmake__builddir/bin -find -maxdepth 1 -type f -executable -not -name 'test-*' -printf '%%f\0' | +find -maxdepth 1 -type f -executable -not -name 'test-*' -not -name 'llama-*' -printf '%%f\0' | xargs -0ti -n1 install -p {} %buildroot%_bindir/llama-{} +find -maxdepth 1 -type f -executable -name 'llama-*' -printf '%%f\0' | + xargs -0ti -n1 install -p {} -t %buildroot%_bindir mkdir -p %buildroot%_unitdir cat <<'EOF' >%buildroot%_unitdir/llama.service