KasmVNC/builder/scripts/build-libjpeg-turbo

33 lines
587 B
Plaintext
Raw Normal View History

2023-01-18 08:01:19 +01:00
#!/usr/bin/env bash
set -euo pipefail
build_and_install() {
export MAKEFLAGS=-j`nproc`
2023-01-24 09:29:05 +01:00
export CFLAGS="-fpic"
2023-01-18 08:01:19 +01:00
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
make
make install
}
install_build_dependencies() {
2023-01-24 10:15:03 +01:00
install_packages cmake gcc
2023-01-18 13:47:04 +01:00
ensure_libjpeg_is_fast
2023-01-18 08:01:19 +01:00
}
ensure_libjpeg_is_fast() {
2023-01-24 10:15:03 +01:00
install_packages nasm
2023-01-18 08:01:19 +01:00
}
prepare_libjpeg_source() {
git clone --depth=1 https://github.com/libjpeg-turbo/libjpeg-turbo.git
cd libjpeg-turbo
}
2023-01-18 13:35:36 +01:00
source_dir=$(dirname "$0")
. "$source_dir/common.sh"
2023-01-18 08:01:19 +01:00
install_build_dependencies
prepare_libjpeg_source
build_and_install