KasmVNC/builder/build-rpm
Dmitry Maksyoma 91eb953f62
Feature/kasm 1838 libjpeg turbo from source (#49)
New build option with latest stable libjpeg-turbo library
2021-09-07 08:11:21 -04:00

27 lines
710 B
Bash
Executable File

#!/bin/bash
set -e
warn_build_tag_not_supported_for_rpm_and_exit() {
local build_tag="$1"
if [[ -n "$build_tag" ]]; then
echo >&2 "<build_tag> isn't supported for rpm"
exit 1
fi
}
cd "$(dirname "$0")/.."
. builder/os_ver_cli.sh
warn_build_tag_not_supported_for_rpm_and_exit "$build_tag"
docker build -t kasmvnc_rpmbuilder_${os}:${os_codename} -f \
builder/dockerfile.${os}_${os_codename}.rpm.build .
source_dir=$(echo $PWD)
L_UID=$(id -u) #Ubuntu already has UID env var, but this should work on all Linix systems
L_GID=$(id -g)
docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
kasmvnc_rpmbuilder_${os}:${os_codename} /bin/bash -c \
'/src/builder/build-rpm-inside-docker'