mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-01-23 02:14:29 +00:00
VNC-156 Add build script for libcpuid
This commit is contained in:
parent
40ac51c3a8
commit
209702638b
2 changed files with 28 additions and 1 deletions
26
builder/scripts/build-cpuid
Executable file
26
builder/scripts/build-cpuid
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
build_and_install() {
|
||||
cmake -S . -B build -DLIBCPUID_ENABLE_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -GNinja
|
||||
ninja -C build install
|
||||
}
|
||||
|
||||
prepare_source() {
|
||||
DIR=tbb
|
||||
cd /tmp
|
||||
[ -d ./${DIR} ] && rm -rf ./${DIR}
|
||||
mkdir ${DIR}
|
||||
|
||||
LIBCPUID_RELEASE=$(curl -sL "https://api.github.com/repos/anrieff/libcpuid/releases/latest" \
|
||||
| grep '"tag_name":' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||
|
||||
curl -Ls "https://github.com/anrieff/libcpuid/archive/${LIBCPUID_RELEASE}.tar.gz" | \
|
||||
|
||||
tar xzvf - -C ${DIR}/ --strip-components=1
|
||||
cd ${DIR}
|
||||
}
|
||||
|
||||
prepare_source
|
||||
build_and_install
|
||||
|
|
@ -5,4 +5,5 @@ set -e
|
|||
source_dir=$(dirname "$0")
|
||||
"${source_dir}"/build-libjpeg-turbo
|
||||
"${source_dir}"/build-webp
|
||||
"${source_dir}"/build-tbb
|
||||
"${source_dir}"/build-tbb
|
||||
"${source_dir}"/build-cpuid
|
||||
Loading…
Add table
Add a link
Reference in a new issue