KasmVNC/builder/build-deb-inside-docker
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

34 lines
794 B
Bash
Executable File

#!/bin/bash
set -e
prepare_docker_copy_of_debian_dir_and_cd_to_id() {
cd "$(dirname "$0")/.."
local mounted_src_dir="$PWD"
local docker_src_dir="$HOME/src"
mkdir "$docker_src_dir"
cd "$docker_src_dir"
cp -a "$mounted_src_dir/debian/" .
ln -s "$mounted_src_dir/builder" .
}
prepare_docker_copy_of_debian_dir_and_cd_to_id
os=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
os_codename=$(lsb_release -cs)
os_dir="builder/build/${os_codename}"
if [ "$BUILD_TAG" = "+libjpeg-turbo_latest" ]; then
echo 'libjpeg 62 libjpeg-turbo (>= 2.1.1)' > debian/shlibs.local
debian_revision="$(echo $BUILD_TAG | tr _ -)"
sed -i -e "1 s/)/$debian_revision)/" debian/changelog
fi
dpkg-buildpackage -us -uc -b
mkdir -p "$os_dir"
cp ../*.deb "$os_dir"
lintian ../*.deb || true