2021-01-07 09:57:53 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-09-07 14:11:21 +02:00
|
|
|
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
|
2021-01-07 09:57:53 +01:00
|
|
|
|
2021-01-19 11:02:49 +01:00
|
|
|
os=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
|
2021-01-28 10:10:46 +01:00
|
|
|
os_codename=$(lsb_release -cs)
|
|
|
|
os_dir="builder/build/${os_codename}"
|
2021-01-19 11:02:49 +01:00
|
|
|
|
2021-09-07 14:11:21 +02:00
|
|
|
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
|
|
|
|
|
2021-01-07 09:57:53 +01:00
|
|
|
dpkg-buildpackage -us -uc -b
|
2021-01-19 11:02:49 +01:00
|
|
|
mkdir -p "$os_dir"
|
|
|
|
cp ../*.deb "$os_dir"
|
2021-01-20 10:45:17 +01:00
|
|
|
lintian ../*.deb || true
|