spec: Fix install of already llama- prefixed binaries

Such as llama-bench.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
Vitaly Chikunov 2024-06-03 10:27:24 +03:00
parent 7c0bdd00e4
commit 643a495f3b

View file

@ -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