You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KasmVNC/builder/scripts/build-libjpeg-turbo

31 lines
588 B
Bash

#!/usr/bin/env bash
set -euo pipefail
build_and_install() {
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fno-semantic-interposition -fpic -flto"
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
make
make install
}
install_build_dependencies() {
apt-get update
apt-get install -y cmake gcc
ensure_libjpeg_is_fast
}
ensure_libjpeg_is_fast() {
apt-get install -y nasm
}
prepare_libjpeg_source() {
git clone --depth=1 https://github.com/libjpeg-turbo/libjpeg-turbo.git
cd libjpeg-turbo
}
install_build_dependencies
prepare_libjpeg_source
build_and_install