Copy debian/ inside docker and patch as needed

This commit is contained in:
Dmitry Maksyoma
2021-09-01 00:48:20 +12:00
parent 51b8d6e19f
commit 45e6bd201d
7 changed files with 28 additions and 2 deletions

View File

@@ -2,7 +2,19 @@
set -e
cd "$(dirname "$0")/.."
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)
@@ -10,7 +22,9 @@ os_dir="builder/build/${os_codename}"
if [ "$BUILD_TAG" = "+libjpeg-turbo_latest" ]; then
echo 'libjpeg 62 libjpeg-turbo (>= 2.1.1)' > debian/shlibs.local
trap 'rm -f debian/shlibs.local' EXIT
debian_revision="$(echo $BUILD_TAG | tr _ -)"
sed -i -e "1 s/)/$debian_revision)/p" debian/changelog
fi
dpkg-buildpackage -us -uc -b

View File

@@ -9,4 +9,6 @@ RUN apt-get update && \
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
RUN useradd -m docker -u 1000
USER 1000

View File

@@ -9,4 +9,6 @@ RUN apt-get update && \
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
RUN useradd -m docker -u 1000
USER 1000

View File

@@ -9,4 +9,6 @@ RUN apt-get update && \
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
RUN useradd -m docker -u 1000
USER 1000

View File

@@ -13,4 +13,6 @@ RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
ENV LD_LIBRARY_PATH="/opt/libjpeg-turbo/lib64/:$LD_LIBRARY_PATH"
RUN useradd -m docker -u 1000
USER 1000

View File

@@ -7,4 +7,6 @@ RUN apt-get update && \
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
RUN useradd -m docker -u 1000
USER 1000

View File

@@ -9,4 +9,6 @@ RUN apt-get update && \
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
RUN useradd -m docker -u 1000
USER 1000